-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Version 0.600 disallows per module configuration globs like mypy-project.apps.*.migrations.* #5014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The semantics of the config file changed in #4894 (which made it into the 0.600 release). It may be possible to relax the rules to allow wildcards within a pattern, but @msullivan would know more. Edit: I don't think this is a bug per se, so I'm labeling it a question for now. |
Hm, I'm wondering if we should roll back this limitation somehow. It's an
edge case but it seems there are some real-world patterns that benefit.
Unfortunately the only workaround in 0.600 is to list all modules
separately (you can use
[mypy-foo.migrations,bar.migrations,baz.migrations]).
|
It can be relaxed, as glob can handle a wildcard in the middle of a pattern. Currently there is a check: |
IIUC @msullivan discovered that a mypy.ini with many entries caused a big slowdown (due to something O(N**2) I'm sure) and fixed it using better caching in #4894, but the cache only supports * in the final component, or something. |
I think this will be a problem for many projects, Django especially. In our Django project, we currently ignore all errors in admin files since admin action attributes cause errors ( Would love to see support for these types of use-cases! |
@msullivan It looks like we really need to fix this. |
Approximately how many packages do you have that those match, @nevc? |
@msullivan We currently have 22 Django apps and are adding more pretty quickly, call it ~1 per month currently - both for feature work and splitting some of our existing bloated apps. We could add each app to our |
I'll have a fix up soon to get it into 0.610 |
This is to support Django-style usecases with patterns like `site.*.migrations.*`. The implementation works by mixing in the old-style glob matching with the new structured matching. Fixes #5014.
This is to support Django-style usecases with patterns like `site.*.migrations.*`. The implementation works by mixing in the old-style glob matching with the new structured matching. Fixes #5014.
This is to support Django-style usecases with patterns like `site.*.migrations.*`. The implementation works by mixing in the old-style glob matching with the new structured matching. Fixes #5014.
This is to support Django-style usecases with patterns like `site.*.migrations.*`. The implementation works by mixing in the old-style glob matching with the new structured matching. Fixes #5014.
I have a Django project with many apps and I want to disable mypy in all of
migrations
modules of each app. Up to0.590
it was possible and since0.600
this feature seems to be dropped.This is my
mypy.ini
config:The text was updated successfully, but these errors were encountered: