René's URL Explorer Experiment


Title: Add ability to ignore a file or directory without modifying it · Issue #4675 · python/mypy · GitHub

Open Graph Title: Add ability to ignore a file or directory without modifying it · Issue #4675 · python/mypy

X Title: Add ability to ignore a file or directory without modifying it · Issue #4675 · python/mypy

Description: In a project I maintain, we vendor some third party Python code and the project includes generated files such as files created by python-versioneer. What I'd like to do is type check all files, including any new files, apart from those t...

Open Graph Description: In a project I maintain, we vendor some third party Python code and the project includes generated files such as files created by python-versioneer. What I'd like to do is type check all files, inc...

X Description: In a project I maintain, we vendor some third party Python code and the project includes generated files such as files created by python-versioneer. What I'd like to do is type check all files,...

Opengraph URL: https://github.com/python/mypy/issues/4675

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add ability to ignore a file or directory without modifying it","articleBody":"In [a project](https://github.com/mesosphere/dcos-e2e) I maintain, we vendor some third party Python code and the project includes generated files such as files created by [python-versioneer](https://github.com/warner/python-versioneer).\r\n\r\nWhat I'd like to do is type check all files, including any new files, apart from those that I have explicitly ignored.\r\n\r\nRight now I have the following hack workaround:\r\n\r\n```python\r\nimport subprocess\r\nimport sys\r\n\r\n\r\ndef main() -> None:\r\n    args = ['mypy', '.']\r\n    ignore_paths = {\r\n        'src/dcos_e2e/_vendor',\r\n        'src/dcos_e2e/_version.py',\r\n        'versioneer.py',\r\n    }\r\n    result = subprocess.run(args=args, stdout=subprocess.PIPE)\r\n    result_lines = result.stdout.decode().strip().split('\\n')\r\n    error_lines = [\r\n        line for line in result_lines\r\n        if not any(line.startswith(path) for path in ignore_paths)\r\n    ]\r\n    print('\\n'.join(error_lines))\r\n    sys.exit(int(bool(error_lines)))\r\n\r\n\r\nif __name__ == '__main__':\r\n    main()\r\n```\r\n\r\nVarious tools have mechanisms for doing this, for example:\r\n\r\n```\r\nAdam@MacBook-Pro ~/D/m/d/dcos-e2e> cat .isort.cfg \r\n[settings]\r\nskip=_vendor,\r\n     src/dcos_e2e/__init__.py,\r\n     versioneer.py,\r\n     setup.py,\r\n```\r\n\r\n```\r\n[flake8]\r\nexclude=./src/dcos_e2e/_vendor/,\r\n        ./src/dcos_e2e/_version.py,\r\n        ./versioneer.py,\r\n```\r\n\r\n```\r\nAdam@MacBook-Pro ~/D/m/d/dcos-e2e> cat pylintrc | grep ignore= -A 3\r\nignore=CVS,\r\n       _vendor,\r\n      versioneer.py,\r\n      _version.py,\r\n```\r\n\r\nThank you for the software.","author":{"url":"https://github.com/adamtheturtle","@type":"Person","name":"adamtheturtle"},"datePublished":"2018-03-03T11:26:59Z","url":"https://github.com/python/mypy/issues/4675"}

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:64780a38-220a-9f28-06a4-d885799a14c1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id99D2:1F52F6:28EA62:3761E5:6B0024E5
html-safe-nonce4725a48f35d12700a2d456a752db22024a9b44929bfcfa6c107efd01a9966786
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OUQyOjFGNTJGNjoyOEVBNjI6Mzc2MUU1OjZCMDAyNEU1IiwidmlzaXRvcl9pZCI6Ijc3MjAzMzc3ODgwNTQyODM0OTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmace88727f76f8b16639190347c17ec3741d694a4ae33579ad877437d1a693b9de0
hovercard-subject-tagissue:301990750
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/mypy/4675/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c2c8e3ae7bb9092215a5fcff332e7e8e7638d164eed74b9c0b2cf762fcfac5b9/python/mypy/issues/4675
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c2c8e3ae7bb9092215a5fcff332e7e8e7638d164eed74b9c0b2cf762fcfac5b9/python/mypy/issues/4675
og:image:altIn a project I maintain, we vendor some third party Python code and the project includes generated files such as files created by python-versioneer. What I'd like to do is type check all files, inc...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameadamtheturtle
hostnamegithub.com
expected-hostnamegithub.com
None4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0
turbo-cache-controlno-preview
go-importgithub.com/python/mypy git https://github.com/python/mypy.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id7053637
octolytics-dimension-repository_nwopython/mypy
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7053637
octolytics-dimension-repository_network_root_nwopython/mypy
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
release44c658b24abf00491fb7ae5f56d42c9f38cbeab2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/4675#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F4675
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%2Fmypy%2Fissues%2F4675
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%2Fmypy
Reloadhttps://github.com/python/mypy/issues/4675
Reloadhttps://github.com/python/mypy/issues/4675
Reloadhttps://github.com/python/mypy/issues/4675
pythonhttps://github.com/python
mypyhttps://github.com/python/mypy
Codehttps://github.com/python/mypy
Issues2.7k (2.7k)https://github.com/python/mypy/issues
Pull requests546 (546)https://github.com/python/mypy/pulls
Actionshttps://github.com/python/mypy/actions
Projectshttps://github.com/python/mypy/projects
Wikihttps://github.com/python/mypy/wiki
Security and qualityhttps://github.com/python/mypy/security
Insightshttps://github.com/python/mypy/insights
https://github.com/python/mypy
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/4675
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/4675
#9992https://github.com/python/mypy/pull/9992
Add ability to ignore a file or directory without modifying ithttps://github.com/python/mypy/issues/4675#top
#9992https://github.com/python/mypy/pull/9992
https://github.com/adamtheturtle
adamtheturtlehttps://github.com/adamtheturtle
on Mar 3, 2018https://github.com/python/mypy/issues/4675#issue-301990750
a projecthttps://github.com/mesosphere/dcos-e2e
python-versioneerhttps://github.com/warner/python-versioneer
Nexthttps://github.com/python/mypy/issues/4675?timeline_page=1
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Mar 3, 2018https://github.com/python/mypy/issues/4675#issuecomment-370160735
config file docshttp://mypy.readthedocs.io/en/latest/config_file.html
https://github.com/adamtheturtle
adamtheturtlehttps://github.com/adamtheturtle
on Mar 3, 2018https://github.com/python/mypy/issues/4675#issuecomment-370160886
adamtheturtlehttps://github.com/adamtheturtle
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Mar 3, 2018https://github.com/python/mypy/issues/4675#event-1502581038
https://github.com/danielbraun89
danielbraun89https://github.com/danielbraun89
on Jul 22, 2019https://github.com/python/mypy/issues/4675#issuecomment-513679210
config file docshttp://mypy.readthedocs.io/en/latest/config_file.html
https://github.com/sidmitra
sidmitrahttps://github.com/sidmitra
on Oct 7, 2019https://github.com/python/mypy/issues/4675#issuecomment-539245815
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Oct 7, 2019https://github.com/python/mypy/issues/4675#issuecomment-539247929
@danielbraun89https://github.com/danielbraun89
@sidmitrahttps://github.com/sidmitra
https://github.com/Djedouas
Djedouashttps://github.com/Djedouas
on Oct 29, 2019https://github.com/python/mypy/issues/4675#issuecomment-547474764
https://github.com/brandtbucher
brandtbucherhttps://github.com/brandtbucher
on Oct 29, 2019https://github.com/python/mypy/issues/4675#issuecomment-547497505
@Djedouashttps://github.com/Djedouas
https://github.com/Djedouas
Djedouashttps://github.com/Djedouas
on Oct 30, 2019https://github.com/python/mypy/issues/4675#issuecomment-547770184
@brandtbucherhttps://github.com/brandtbucher
https://github.com/ericfrederich
ericfrederichhttps://github.com/ericfrederich
on Dec 3, 2019https://github.com/python/mypy/issues/4675#issuecomment-561175198
versioneerhttps://pypi.org/project/versioneer/
@adamtheturtlehttps://github.com/adamtheturtle
pre-commithttps://pre-commit.com/
blackhttps://pypi.org/project/black/
https://github.com/bhrutledge
bhrutledgehttps://github.com/bhrutledge
on May 12, 2020https://github.com/python/mypy/issues/4675#issuecomment-627272252
pypa/twine#619https://github.com/pypa/twine/pull/619
https://github.com/pypa/twine/pull/619/files#r423015876https://github.com/pypa/twine/pull/619/files#r423015876
https://github.com/Hubro
Hubrohttps://github.com/Hubro
on May 25, 2020https://github.com/python/mypy/issues/4675#issuecomment-633563460
https://github.com/bhrutledge
bhrutledgehttps://github.com/bhrutledge
on May 25, 2020https://github.com/python/mypy/issues/4675#issuecomment-633571080
@Hubrohttps://github.com/Hubro
#4675 (comment)https://github.com/python/mypy/issues/4675#issuecomment-627272252
https://github.com/waketzheng
waketzhenghttps://github.com/waketzheng
on Nov 11, 2020https://github.com/python/mypy/issues/4675#issuecomment-725412666
https://github.com/micahjsmith
micahjsmithhttps://github.com/micahjsmith
on Jan 22, 2021https://github.com/python/mypy/issues/4675#issuecomment-765586163
cookiecutterhttps://github.com/python/mypy/issues/cookiecutter.readthedocs.io/
https://github.com/wbekerom
wbekeromhttps://github.com/wbekerom
on Feb 1, 2021https://github.com/python/mypy/issues/4675#issuecomment-770742996
#9992https://github.com/python/mypy/pull/9992
https://github.com/dmontagu
dmontaguhttps://github.com/dmontagu
on Feb 2, 2021https://github.com/python/mypy/issues/4675#issuecomment-771399770
https://github.com/omry
omryhttps://github.com/omry
on Feb 3, 2021https://github.com/python/mypy/issues/4675#issuecomment-772896233
JukkaLhttps://github.com/JukkaL
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#9992https://github.com/python/mypy/pull/9992
on Feb 10, 2021https://github.com/python/mypy/issues/4675#event-4315726376
JukkaLhttps://github.com/JukkaL
on Feb 10, 2021https://github.com/python/mypy/issues/4675#event-4315726708
Add --exclude (#9992)https://github.com/python/mypy/commit/6bfc2dbc0e877408f5b70b86818683cd211c0031
#9992https://github.com/python/mypy/pull/9992
https://docs.github.com/articles/closing-issues-via-commit-messages
6bfc2dbhttps://github.com/python/mypy/commit/6bfc2dbc0e877408f5b70b86818683cd211c0031
Add --exclude (#9992)https://github.com/python/mypy/commit/a1a22ca50f29484ef677d011fd8905cd0ad20f46
#9992https://github.com/python/mypy/pull/9992
https://docs.github.com/articles/closing-issues-via-commit-messages
a1a22cahttps://github.com/python/mypy/commit/a1a22ca50f29484ef677d011fd8905cd0ad20f46
nokomehttps://github.com/nokome
on Feb 19, 2021https://github.com/python/mypy/issues/4675#event-4349873339
chore(Deps): Revert to mypy 0.790https://github.com/stencila/hub/commit/df335d0989cc62dd6c896282eb80608c31d6bb09
df335d0https://github.com/stencila/hub/commit/df335d0989cc62dd6c896282eb80608c31d6bb09
https://github.com/hardikkat24
hardikkat24https://github.com/hardikkat24
on Apr 5, 2021https://github.com/python/mypy/issues/4675#issuecomment-813492066
https://github.com/micahjsmith
micahjsmithhttps://github.com/micahjsmith
on Apr 5, 2021https://github.com/python/mypy/issues/4675#issuecomment-813495933
@hardikkat24https://github.com/hardikkat24
herehttps://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-exclude
https://github.com/hardikkat24
hardikkat24https://github.com/hardikkat24
on Apr 6, 2021https://github.com/python/mypy/issues/4675#issuecomment-813893194
@micahjsmithhttps://github.com/micahjsmith
https://github.com/sonic-chase
sonic-chasehttps://github.com/sonic-chase
on Sep 22, 2022https://github.com/python/mypy/issues/4675#issuecomment-1255162837
cookiecutterhttps://github.com/python/mypy/issues/cookiecutter.readthedocs.io/
https://github.com/micahjsmith
micahjsmithhttps://github.com/micahjsmith
on Sep 22, 2022https://github.com/python/mypy/issues/4675#issuecomment-1255172759
@sonic-chasehttps://github.com/sonic-chase
https://github.com/sonic-chase
sonic-chasehttps://github.com/sonic-chase
on Sep 22, 2022https://github.com/python/mypy/issues/4675#issuecomment-1255184347
@sonic-chasehttps://github.com/sonic-chase
kernchttps://github.com/kernc
on Jun 22, 2024https://github.com/python/mypy/issues/4675#event-13247924977
MNT: Fix CI with mypy 0.800https://github.com/kernc/pdoc/commit/ee05ea95debc4e260a8e73b4bd4c777416ed3a1c
ee05ea9https://github.com/kernc/pdoc/commit/ee05ea95debc4e260a8e73b4bd4c777416ed3a1c
MNT: Fix CI with mypy 0.800https://github.com/johann-petrak/pdoc/commit/dd2b58945b8b6ede556d5f76a950faf4965b0142
dd2b589https://github.com/johann-petrak/pdoc/commit/dd2b58945b8b6ede556d5f76a950faf4965b0142
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/4675
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/4675
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.