You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mypy_test.py has two command-line arguments that I find somewhat useless: filter and exclude. (It looks like they've stayed more-or-less the same since the script's inception 7 years ago.) I'd like to get rid of them and replace them with flags that would allow me to run specific parts of mypy_test locally, instead of running the whole thing at once (e.g. --stdlib to only test the stdlib, or --test-cases to only test the test cases).
I'm actually somewhat inclined to remove the --verbose and --dry-run options as well. I've never found them useful (but I'm happy to keep them if somebody else has).
I'm fine with changing exclude and filter. The approach I find most intuitive was to just run mypy_test stdlib/foo.pyi or mypy_test stubs/bar to test a specific file or directory.
--verbose seems useful in case you need the full mypy command line for some reason. --dry-run on the other hand seems mostly useful when developing mypy_test, so I don't think it's very useful in general.
Unrelated: I would prefer not to test our own scripts in mypy_test. Instead we should have a separate step in CI and just manually call mypy. In my view, testing stubs and testing our support script are two unrelated activities.
Unrelated: I would prefer not to test our own scripts in mypy_test. Instead we should have a separate step in CI and just manually call mypy. In my view, testing stubs and testing our support script are two unrelated activities.
This makes sense, and @hauntsaninja said something similar to me at PyCon. I'm fine with making this change.
I'm fine with changing exclude and filter. The approach I find most intuitive was to just run mypy_test stdlib/foo.pyi or mypy_test stubs/bar to test a specific file or directory.
I generally just invoke mypy directly if I want to test just a specific file or subdirectory. I don't think it makes sense to try to reproduce all of the mypy command-line options in mypy_test, so I'd prefer to keep things simple and just remove these options, personally.
Activity
AlexWaygood commentedon Jun 22, 2022
Alternatively, we could have a single command-line argument,
--dir. Running only on the stdlib would be--dir stdlib, etc.AlexWaygood commentedon Jun 23, 2022
I'm actually somewhat inclined to remove the
--verboseand--dry-runoptions as well. I've never found them useful (but I'm happy to keep them if somebody else has).srittau commentedon Jun 27, 2022
I'm fine with changing
excludeandfilter. The approach I find most intuitive was to just runmypy_test stdlib/foo.pyiormypy_test stubs/barto test a specific file or directory.--verboseseems useful in case you need the full mypy command line for some reason.--dry-runon the other hand seems mostly useful when developing mypy_test, so I don't think it's very useful in general.Unrelated: I would prefer not to test our own scripts in mypy_test. Instead we should have a separate step in CI and just manually call mypy. In my view, testing stubs and testing our support script are two unrelated activities.
AlexWaygood commentedon Jun 27, 2022
This makes sense, and @hauntsaninja said something similar to me at PyCon. I'm fine with making this change.
AlexWaygood commentedon Jun 27, 2022
I generally just invoke mypy directly if I want to test just a specific file or subdirectory. I don't think it makes sense to try to reproduce all of the mypy command-line options in
mypy_test, so I'd prefer to keep things simple and just remove these options, personally.`mypy_test.py`: Remove `--dry-run` option (#8611)