René's URL Explorer Experiment


Title: Please revert new source finding behaviour or add some way to exclude paths · Issue #9981 · python/mypy · GitHub

Open Graph Title: Please revert new source finding behaviour or add some way to exclude paths · Issue #9981 · python/mypy

X Title: Please revert new source finding behaviour or add some way to exclude paths · Issue #9981 · python/mypy

Description: Bug Report I think the PR "find_sources: find build sources recursively" #9614 is a good and worthwhile change. But in practice it causes surprising regressions for many users. It's not just spurious warnings, mypy often refuses to run e...

Open Graph Description: Bug Report I think the PR "find_sources: find build sources recursively" #9614 is a good and worthwhile change. But in practice it causes surprising regressions for many users. It's not just spurio...

X Description: Bug Report I think the PR "find_sources: find build sources recursively" #9614 is a good and worthwhile change. But in practice it causes surprising regressions for many users. It's n...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Please revert new source finding behaviour or add some way to exclude paths","articleBody":"**Bug Report**\r\n\r\nI think the PR \"find_sources: find build sources recursively\" #9614 is a good and worthwhile change. But in practice it causes surprising regressions for many users. It's not just spurious warnings, mypy often refuses to run entirely (\"*Found 1 error in 1 file (errors prevented further checking)*\").\r\n\r\nIn many cases, there aren't good work-arounds, short of restructuring one's project directory tree.\r\n\r\nI think the magnitude of this issue is large enough that the best course of action is to revert the change and issue a hotfix release, until some work-around for those cases is created.\r\n\r\nThere are many examples of common things that throw off mypy:\r\n1. Creating even an empty virtualenv causes mypy to fail to run.\r\n2. Having `__init__.py` files under any directory that's not a valid Python module name.\r\n3. Many npm packages include .py files, which get installed in `node_modules` directory, some of which may have Python 2.7 code that causes syntax errors.\r\n4. Having copies of directories or files with same `.py` file names.\r\n\r\nSome more examples in comments here: https://github.com/python/mypy/issues/4675#issuecomment-765586163\r\n\r\n**To Reproduce**\r\n\r\n```\r\n% mkdir test1\r\n% cd test1\r\n% echo 'a: str = 10' > test.py\r\n% mkdir -p test/invalid-module\r\n% touch test/invalid-module/__init__.py\r\n% mypy .\r\ninvalid-module is not a valid Python package name\r\n```\r\n\r\n```\r\n% mkdir test2\r\n% cd test2\r\n% python3 -m venv ./venv\r\n% echo 'a: str = 10' > test.py\r\n% mypy .\r\nvenv/lib/python3.9/site-packages/setuptools/_distutils/command/bdist_msi.py:355: error: expected an indented block\r\nFound 1 error in 1 file (errors prevented further checking)\r\n                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n```\r\n\r\n```\r\n% mkdir test3\r\n% cd test3\r\n% echo 'a: str = 10' > test.py\r\n% npm install gulp-sass\r\n% mypy .\r\nnode_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/__init__.py:37: error: invalid syntax\r\nFound 1 error in 1 file (errors prevented further checking)\r\n                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n```\r\n\r\n```\r\n% mkdir test4\r\n% cd test4\r\n% echo 'a: str = 10' > test.py\r\n% mkdir backup\r\n% cp test.py backup/\r\n% mypy .\r\ntest.py: error: Duplicate module named 'test' (also at './backup/test.py')\r\ntest.py: error: Are you missing an __init__.py?\r\nFound 2 errors in 1 file (errors prevented further checking)\r\n```\r\n\r\n**Your Environment**\r\n\r\n- Mypy version used: 0.800\r\n- Mypy command-line flags: none\r\n- Mypy configuration options from `mypy.ini` (and other config files): none\r\n- Python version used: 3.9\r\n- Operating system and version: macOS 10.15\r\n","author":{"url":"https://github.com/intgr","@type":"Person","name":"intgr"},"datePublished":"2021-01-27T15:47:43Z","url":"https://github.com/python/mypy/issues/9981"}

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:48c693e6-dc98-7b62-9f06-2e7af8d244b3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8D82:22E601:3DD7F5:5352E3:6B002AB3
html-safe-nonced466b75522a4dac8ed2c915c9504430615c5df6eed0a1b799d976c8301d7171b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDgyOjIyRTYwMTozREQ3RjU6NTM1MkUzOjZCMDAyQUIzIiwidmlzaXRvcl9pZCI6IjE1NzczOTk2MDk2NjYzMTY5NzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacf71b5714c1d40727394574e34890210d68b50a2facf7f0f05842ca02d9e39274
hovercard-subject-tagissue:795218333
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/9981/issue_layout
twitter:imagehttps://opengraph.githubassets.com/af003075c1c06b74f6edde28dfb1e746f6dd39bc959133ed39dc396362c885d8/python/mypy/issues/9981
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/af003075c1c06b74f6edde28dfb1e746f6dd39bc959133ed39dc396362c885d8/python/mypy/issues/9981
og:image:altBug Report I think the PR "find_sources: find build sources recursively" #9614 is a good and worthwhile change. But in practice it causes surprising regressions for many users. It's not just spurio...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameintgr
hostnamegithub.com
expected-hostnamegithub.com
None7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0
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
releasef3f3a43ca095cdea3abbb394112e971f9fdb94fa
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/9981#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F9981
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%2F9981
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/9981
Reloadhttps://github.com/python/mypy/issues/9981
Reloadhttps://github.com/python/mypy/issues/9981
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 requests547 (547)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/9981
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/9981
#9992https://github.com/python/mypy/pull/9992
Please revert new source finding behaviour or add some way to exclude pathshttps://github.com/python/mypy/issues/9981#top
#9992https://github.com/python/mypy/pull/9992
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/intgr
intgrhttps://github.com/intgr
on Jan 27, 2021https://github.com/python/mypy/issues/9981#issue-795218333
#9614https://github.com/python/mypy/pull/9614
#4675 (comment)https://github.com/python/mypy/issues/4675#issuecomment-765586163
intgrhttps://github.com/intgr
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
on Jan 27, 2021https://github.com/python/mypy/issues/9981#event-4256580035
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Jan 27, 2021https://github.com/python/mypy/issues/9981#issuecomment-768480056
@intgrhttps://github.com/intgr
@hauntsaninjahttps://github.com/hauntsaninja
https://github.com/volans-
volans-https://github.com/volans-
on Jan 27, 2021https://github.com/python/mypy/issues/9981#issuecomment-768502721
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Jan 27, 2021https://github.com/python/mypy/issues/9981#issuecomment-768550148
@JukkaLhttps://github.com/JukkaL
#4675 (comment)https://github.com/python/mypy/issues/4675#issuecomment-765600702
wmfgerrithttps://github.com/wmfgerrit
on Jan 27, 2021https://github.com/python/mypy/issues/9981#event-4257940457
mypy: temporary force upper versionhttps://github.com/wikimedia/operations-software-spicerack/commit/68e89025470e970a27c9ed0c3d22dfc2d23f79c7
68e8902https://github.com/wikimedia/operations-software-spicerack/commit/68e89025470e970a27c9ed0c3d22dfc2d23f79c7
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Jan 28, 2021https://github.com/python/mypy/issues/9981#issuecomment-769126126
@hauntsaninjahttps://github.com/hauntsaninja
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Jan 28, 2021https://github.com/python/mypy/issues/9981#issuecomment-769177615
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Jan 28, 2021https://github.com/python/mypy/issues/9981#issuecomment-769361819
mypy/mypy/find_sources.pyhttps://github.com/python/mypy/blob/4d5a1bc75224e1c532557861261becac7d8fdf47/mypy/find_sources.py#L106
4d5a1bchttps://github.com/python/mypy/commit/4d5a1bc75224e1c532557861261becac7d8fdf47
hauntsaninjahttps://github.com/hauntsaninja
on Jan 29, 2021https://github.com/python/mypy/issues/9981#event-4264913258
Add --ignore-pathhttps://github.com/hauntsaninja/mypy/commit/513b7e18109de24cf21157dd93b7969a9b5b0cd9
https://docs.github.com/articles/closing-issues-via-commit-messages
513b7e1https://github.com/hauntsaninja/mypy/commit/513b7e18109de24cf21157dd93b7969a9b5b0cd9
Add --ignore-pathhttps://github.com/hauntsaninja/mypy/commit/f18466662c7501d1ac7eab04dd28a6c6f30ff405
https://docs.github.com/articles/closing-issues-via-commit-messages
f184666https://github.com/hauntsaninja/mypy/commit/f18466662c7501d1ac7eab04dd28a6c6f30ff405
https://github.com/rmspeers
rmspeershttps://github.com/rmspeers
on Jan 29, 2021https://github.com/python/mypy/issues/9981#issuecomment-770071785
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Jan 29, 2021https://github.com/python/mypy/issues/9981#issuecomment-770097995
https://github.com/intgr
intgrhttps://github.com/intgr
on Jan 30, 2021https://github.com/python/mypy/issues/9981#issuecomment-770230237
intgrhttps://github.com/intgr
on Jan 30, 2021https://github.com/python/mypy/issues/9981#event-4269251052
PeterJCLawhttps://github.com/PeterJCLaw
on Jan 31, 2021https://github.com/python/mypy/issues/9981#event-4270326756
Work around python/mypy#9981https://github.com/PeterJCLaw/srcomp/commit/635702b7ff0334b6a1e42c645dafec2a371a8a4c
python/mypy#9981https://github.com/python/mypy/issues/9981
635702bhttps://github.com/PeterJCLaw/srcomp/commit/635702b7ff0334b6a1e42c645dafec2a371a8a4c
Work around python/mypy#9981https://github.com/PeterJCLaw/srcomp-http/commit/92a52a44f94669728344f59b16b97c9389dad998
python/mypy#9981https://github.com/python/mypy/issues/9981
92a52a4https://github.com/PeterJCLaw/srcomp-http/commit/92a52a44f94669728344f59b16b97c9389dad998
https://github.com/rmspeers
rmspeershttps://github.com/rmspeers
on Jan 31, 2021https://github.com/python/mypy/issues/9981#issuecomment-770392297
@hauntsaninjahttps://github.com/hauntsaninja
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Jan 31, 2021https://github.com/python/mypy/issues/9981#issuecomment-770455866
#9677https://github.com/python/mypy/issues/9677
#8726https://github.com/python/mypy/issues/8726
https://github.com/rmspeers
rmspeershttps://github.com/rmspeers
on Feb 1, 2021https://github.com/python/mypy/issues/9981#issuecomment-770485162
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/9981#event-4315726386
JukkaLhttps://github.com/JukkaL
on Feb 10, 2021https://github.com/python/mypy/issues/9981#event-4315726717
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
https://github.com/intgr
intgrhttps://github.com/intgr
on Feb 18, 2021https://github.com/python/mypy/issues/9981#issuecomment-781625610
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Feb 18, 2021https://github.com/python/mypy/issues/9981#issuecomment-781648871
#10062https://github.com/python/mypy/issues/10062
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/9981
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/9981
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
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.