René's URL Explorer Experiment


Title: Cannot override linter options per project · Issue #1158 · python-mode/python-mode · GitHub

Open Graph Title: Cannot override linter options per project · Issue #1158 · python-mode/python-mode

X Title: Cannot override linter options per project · Issue #1158 · python-mode/python-mode

Description: The following code prevents us from overriding the linter options per project. python-mode/pymode/lint.py Lines 52 to 57 in 85d2cd1 for linter in linters: opts = env.var('g:pymode_lint_options_%s' % linter, silence=True) if opts: options...

Open Graph Description: The following code prevents us from overriding the linter options per project. python-mode/pymode/lint.py Lines 52 to 57 in 85d2cd1 for linter in linters: opts = env.var('g:pymode_lint_options_%s' ...

X Description: The following code prevents us from overriding the linter options per project. python-mode/pymode/lint.py Lines 52 to 57 in 85d2cd1 for linter in linters: opts = env.var('g:pymode_lint_options_...

Opengraph URL: https://github.com/python-mode/python-mode/issues/1158

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cannot override linter options per project","articleBody":"The following code prevents us from overriding the linter options per project.\r\n \r\nhttps://github.com/python-mode/python-mode/blob/85d2cd1a196ac1def79d4599b5be69395ed5b603/pymode/lint.py#L52-L57\r\n\r\nHere is what the pymode logs show (I have added some log line 53 to see what is set globally):\r\n\r\n```\r\npymode debug msg 9: check code\r\n1661433148 ['pyflakes', 'pep8'] []\r\n1661433148 Namespace(paths=['/tmp/bla'], verbose=False, format='pycodestyle', select=[], sort=[], linters=[('pyflakes', \u003cpylama.lint.pylama_pyflakes.Linter object at 0x7f177ab71870>), ('pep8', \u003cpylama.lint.pylama_pycodestyle.Linter object\r\nat 0x7f177ab71990>)], ignore=['W'], skip=[], report=None, hook=False, concurrent=False, options='/tmp/bla/pylama.ini', force=True, abspath=False, file_params={}, linters_params={'pep8': {'max_line_length': 101}}) []\r\n1661433148 g:pymode_lint_options_pyflakes -> {'builtins': '_'} []\r\n1661433148 g:pymode_lint_options_pep8 -> {'max_line_length': '79'} []\r\n1661433148 Start code check:  [wrong.py]\r\nChecking params: {'skip': False, 'ignore': {'W'}, 'select': set(), 'linters': []} - Namespace(paths=['/tmp/bla'], verbose=False, format='pycodestyle', select=[], sort=[], linters=[('pyflakes', \u003cpylama.lint.pylama_pyflakes.Linter object at\r\n0x7f177ab71870>), ('pep8', \u003cpylama.lint.pylama_pycodestyle.Linter object at 0x7f177ab71990>)], ignore=['W'], skip=[], report=None, hook=False, concurrent=False, options='/tmp/bla/pylama.ini', force=True, abspath=False, file_params={}, lint\r\ners_params={'pep8': {'max_line_length': '79'}, 'pyflakes': {'builtins': '_'}})\r\nRun pyflakes {'builtins': '_'}\r\nRun pep8 {'max_line_length': '79'}\r\n``` \r\n\r\nAs you can see, `pylama` finds its custom settings inside the `pylama.ini` file, but they are then overridden.\r\n\r\nI would have expected the `pylama.ini` settings to override the _global_ ones but it's definitely not the case.\r\n\r\nI'd suggest the code above to be replaced with:\r\n\r\n```python\r\n        for linter in linters:\r\n            opts = env.var('g:pymode_lint_options_%s' % linter, silence=True)\r\n            if opts:\r\n                opts_override = options.linters_params.get(linter, {})\r\n                options.linters_params[linter] = opts\r\n                options.linters_params[linter].update(opts_override)\r\n``` \r\n\r\nI can open a PR if needed","author":{"url":"https://github.com/ziirish","@type":"Person","name":"ziirish"},"datePublished":"2022-08-25T13:33:18Z","url":"https://github.com/python-mode/python-mode/issues/1158"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a1e6c634-b25b-142a-db93-48e7dceaed53
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9E38:247D07:6B2376:91F3AB:6AFE66D3
html-safe-noncef6a5e9ae33c703012b5cfdec315f121a0a0e3344bc0f9ba53106c3fbe3ddb15d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTM4OjI0N0QwNzo2QjIzNzY6OTFGM0FCOjZBRkU2NkQzIiwidmlzaXRvcl9pZCI6IjgzMTUyNzQxODM5OTQ5MjY4MDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac62cd799102721d353924ad3d18d4bb90c46d3e00895ae396953c9e0c4e01e2e3
hovercard-subject-tagissue:1350909845
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-mode/python-mode/1158/issue_layout
twitter:imagehttps://opengraph.githubassets.com/75db1cefe17ee7526364bf75c40008aadd9e84fb140e77f689d2d0aea82d9b07/python-mode/python-mode/issues/1158
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/75db1cefe17ee7526364bf75c40008aadd9e84fb140e77f689d2d0aea82d9b07/python-mode/python-mode/issues/1158
og:image:altThe following code prevents us from overriding the linter options per project. python-mode/pymode/lint.py Lines 52 to 57 in 85d2cd1 for linter in linters: opts = env.var('g:pymode_lint_options_%s' ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameziirish
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
go-importgithub.com/python-mode/python-mode git https://github.com/python-mode/python-mode.git
octolytics-dimension-user_id13965098
octolytics-dimension-user_loginpython-mode
octolytics-dimension-repository_id2408911
octolytics-dimension-repository_nwopython-mode/python-mode
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id2408911
octolytics-dimension-repository_network_root_nwopython-mode/python-mode
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python-mode/python-mode/issues/1158#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-mode%2Fpython-mode%2Fissues%2F1158
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-mode%2Fpython-mode%2Fissues%2F1158
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python-mode%2Fpython-mode
Reloadhttps://github.com/python-mode/python-mode/issues/1158
Reloadhttps://github.com/python-mode/python-mode/issues/1158
Reloadhttps://github.com/python-mode/python-mode/issues/1158
python-modehttps://github.com/python-mode
python-modehttps://github.com/python-mode/python-mode
Codehttps://github.com/python-mode/python-mode
Issues38 (38)https://github.com/python-mode/python-mode/issues
Pull requests1 (1)https://github.com/python-mode/python-mode/pulls
Actionshttps://github.com/python-mode/python-mode/actions
Projectshttps://github.com/python-mode/python-mode/projects
Wikihttps://github.com/python-mode/python-mode/wiki
Security and qualityhttps://github.com/python-mode/python-mode/security
Insightshttps://github.com/python-mode/python-mode/insights
https://github.com/python-mode/python-mode
New issuehttps://github.com/login?return_to=https://github.com/python-mode/python-mode/issues/1158
New issuehttps://github.com/login?return_to=https://github.com/python-mode/python-mode/issues/1158
Cannot override linter options per projecthttps://github.com/python-mode/python-mode/issues/1158#top
https://github.com/ziirish
ziirishhttps://github.com/ziirish
on Aug 25, 2022https://github.com/python-mode/python-mode/issues/1158#issue-1350909845
python-mode/pymode/lint.pyhttps://github.com/python-mode/python-mode/blob/85d2cd1a196ac1def79d4599b5be69395ed5b603/pymode/lint.py#L52-L57
85d2cd1https://github.com/python-mode/python-mode/commit/85d2cd1a196ac1def79d4599b5be69395ed5b603
Sign up for freehttps://github.com/signup?return_to=https://github.com/python-mode/python-mode/issues/1158
Sign in to commenthttps://github.com/login?return_to=https://github.com/python-mode/python-mode/issues/1158
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.