Title: Mypy cache doesn't update if type stubs refer to first-party code · Issue #5489 · python/mypy · GitHub
Open Graph Title: Mypy cache doesn't update if type stubs refer to first-party code · Issue #5489 · python/mypy
X Title: Mypy cache doesn't update if type stubs refer to first-party code · Issue #5489 · python/mypy
Description: Hi, I have a very unusual use case. It's ok if this issue doesn't end up being resolved but I figured I'd report it just in case. Basically, I have a Django project, let's say it's a package called myproject, and it has a settings module...
Open Graph Description: Hi, I have a very unusual use case. It's ok if this issue doesn't end up being resolved but I figured I'd report it just in case. Basically, I have a Django project, let's say it's a package called...
X Description: Hi, I have a very unusual use case. It's ok if this issue doesn't end up being resolved but I figured I'd report it just in case. Basically, I have a Django project, let's say it...
Opengraph URL: https://github.com/python/mypy/issues/5489
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Mypy cache doesn't update if type stubs refer to first-party code","articleBody":"Hi, I have a very unusual use case. It's ok if this issue doesn't end up being resolved but I figured I'd report it just in case.\r\n\r\nBasically, I have a Django project, let's say it's a package called `myproject`, and it has a settings module at `myproject.settings`. The idiomatic Django way to expose these settings is via a `from djang.conf import settings` import, but these settings are largely just an alias to my own settings module. So as a quick win for strong typing, I thought I'd make a stub for `django.conf.settings` that looked like this:\r\n\r\n```python\r\n# mypy-stubs/django/conf/settings.pyi\r\nfrom myproject.settings import *\r\n```\r\n\r\nSo the stub is pointing back at my first-party code, which is probably unexpected. This used to work fine all the time before mypy introduced incremental mode, but now that it defaults to incremental mode, I've noticed that I have to delete my `.mypy_cache` directory whenever I change typings in `myproject.settings`--otherwise mypy thinks that the typings for `django.conf.settings` are the stale version.\r\n\r\nAnyhow, like I said, this is a very weird use case and probably not worth your time, but I figured I'd report it just in case.","author":{"url":"https://github.com/toolness","@type":"Person","name":"toolness"},"datePublished":"2018-08-16T11:38:48Z","url":"https://github.com/python/mypy/issues/5489"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c9b50881-5e16-156f-c9a1-7252ec390014 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D070:9EA06:51C220:7365BD:6B0076BB |
| html-safe-nonce | fc5e9dbf2d5cc540fc1df60ed714fe12ed47e0ab94abb192126b2ed2b3b298c8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDcwOjlFQTA2OjUxQzIyMDo3MzY1QkQ6NkIwMDc2QkIiLCJ2aXNpdG9yX2lkIjoiODk4NjAyNzE4NTE4NTc4MTQzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5bf88c89ad3f0c031c3f21067418ceed063e095eb5472db1ac3074421c6e298a |
| hovercard-subject-tag | issue:351167846 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/5489/issue_layout |
| twitter:image | https://opengraph.githubassets.com/389490eb976de4da0855fd1312dbfb37c4b44a97acf91db18d19cee9465edac4/python/mypy/issues/5489 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/389490eb976de4da0855fd1312dbfb37c4b44a97acf91db18d19cee9465edac4/python/mypy/issues/5489 |
| og:image:alt | Hi, I have a very unusual use case. It's ok if this issue doesn't end up being resolved but I figured I'd report it just in case. Basically, I have a Django project, let's say it's a package called... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | toolness |
| hostname | github.com |
| expected-hostname | github.com |
| None | 75c2b65dd205f26961d0c29afed1a8d0bb7cca9f05780571dfd1ef93eb539d16 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 84e563eb4b55f8fa102f325f117533cee9e3df4a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width