-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Comparing changes
Open a pull request
base repository: python/mypy
base: defe53f
head repository: python/mypy
compare: f5fc579
- 17 commits
- 20 files changed
- 4 contributors
Commits on Jun 18, 2021
-
Support --install-types --non-interactive that doesn't prompt (#10616)
It also doesn't show errors, making it useful in CI jobs. Example: ``` $ mypy --install-types --non-interactive -c 'import click' Installing missing stub packages: /Users/jukka/venv/mypy/bin/python3 -m pip install types-click Collecting types-click Using cached types_click-7.1.0-py2.py3-none-any.whl (13 kB) Installing collected packages: types-click Successfully installed types-click-7.1.0 ``` Work on #10600.
Configuration menu - View commit details
-
Copy full SHA for 784aa93 - Browse repository at this point
Copy the full SHA 784aa93View commit details -
Fix faulty casts in checker (#10560)
Fixes #9615, fixes #9682 Both issue reports hit the faulty cast on L2803. This changes the logic so that that cast is actually always true. If not, we just end up doing whatever the fallback else clause does; this resulted in behaviour that matched what I expected. After that, the #9682 hit another crash in checker.py, where var.node was None instead of a Var. It seemed reasonable to just branch instead. Co-authored-by: hauntsaninja <>
Configuration menu - View commit details
-
Copy full SHA for e93a700 - Browse repository at this point
Copy the full SHA e93a700View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5af694e - Browse repository at this point
Copy the full SHA 5af694eView commit details -
stubgen: Use NamedTuple class syntax (#10625)
### Description Use `typing.NamedTuple` in stubgen, instead of `collections.namedtuple`. ## Test Plan I modified the existing tests and added another test for an empty namedtuple, to ensure that `Any` is not imported unnecessarily.
Configuration menu - View commit details
-
Copy full SHA for fee4422 - Browse repository at this point
Copy the full SHA fee4422View commit details -
stubgen: never generate variable initializer (#10623)
Previously, the generation of a variable initialized (= ...) was inconsistent between top-level and class-level variables. Since the initializer has no function in stubs, stubgen will now never generate it.
Configuration menu - View commit details
-
Copy full SHA for 2ce3677 - Browse repository at this point
Copy the full SHA 2ce3677View commit details -
stubgen: Don't annotate unknown argument and return types (#10626)
### Description Don't annotate unknown argument and return types with explicit `Any`. Also, fix formatting of functions that have an explicit type and default argument. ## Test Plan I adapted the existing tests. I also added tests to ensure that explicit `Any`s remain in the stub. I also added a test for the formatting fix.
Configuration menu - View commit details
-
Copy full SHA for ae3dcc7 - Browse repository at this point
Copy the full SHA ae3dcc7View commit details -
Configuration menu - View commit details
-
Copy full SHA for f6e4c9e - Browse repository at this point
Copy the full SHA f6e4c9eView commit details -
Don't suggest to install stubs with py.typed files (#10652)
The pallets libraries are now bundled with a `py.typed` file. Suggesting to install these stubs only leads to confusion. See python/typeshed#5423 and python/typeshed#5642 for context.
Configuration menu - View commit details
-
Copy full SHA for 4905aad - Browse repository at this point
Copy the full SHA 4905aadView commit details -
pyopenssl types package name was corrected (#10656)
It's now also available for Python 3
Configuration menu - View commit details
-
Copy full SHA for 0b65866 - Browse repository at this point
Copy the full SHA 0b65866View commit details
Commits on Jun 22, 2021
-
Improve error reporting when --install-types has no cache (#10667)
There are no tests since our test framework makes it tricky to write tests for these kinds of scenarios. Tested manually. Work on #10600.
Configuration menu - View commit details
-
Copy full SHA for f5a3405 - Browse repository at this point
Copy the full SHA f5a3405View commit details -
Run build a second time when using --install-types --non-interactive (#…
…10669) If the first build finds missing stub packages, run the build a second time after installing types. Only show errors from the final build. Example output: ``` $ mypy --install-types --non-interactive t.py Installing missing stub packages: /Users/jukka/venv/mypy/bin/python3 -m pip install types-redis Collecting types-redis Using cached types_redis-3.5.2-py2.py3-none-any.whl (11 kB) Installing collected packages: types-redis Successfully installed types-redis-3.5.2 t.py:2: error: Unsupported operand types for + ("int" and "str") Found 1 error in 1 file (checked 1 source file) ``` Work on #10600.
Configuration menu - View commit details
-
Copy full SHA for e8cf526 - Browse repository at this point
Copy the full SHA e8cf526View commit details -
Configuration menu - View commit details
-
Copy full SHA for 64deb99 - Browse repository at this point
Copy the full SHA 64deb99View commit details -
Configuration menu - View commit details
-
Copy full SHA for 680fded - Browse repository at this point
Copy the FEAE full SHA 680fdedView commit details -
Fix crash with assignment to variable guarded with TypeGuard (#10683)
This is a quick fix to unblock the 0.910 release. The type guard type can be unrelated to the original type, so we shouldn't join it. I'm not sure whether this is right from first principles, but it seems to address the issue. Fixes #10671.
Configuration menu - View commit details
-
Copy full SHA for 9637f99 - Browse repository at this point
Copy the full SHA 9637f99View commit details -
Don't ask to install a stub package if stubs are installed (#10670)
If we encounter an import of a submodule of a package with installed stubs, and the submodule doesn't exist, don't ask to install stubs since that's not going to help. Also make it possible to ignore this error using `--ignore-missing-imports`. Work on #10645.
Configuration menu - View commit details
-
Copy full SHA for 96366d1 - Browse repository at this point
Copy the full SHA 96366d1View commit details -
Fix crash when inferring multiple assignment with overloaded function (…
Configuration menu - View commit details
-
Copy full SHA for 46ce325 - Browse repository at this point
Copy the full SHA 46ce325View commit details -
Configuration menu - View commit details
-
Copy full SHA for f5fc579 - Browse repository at this point
Copy the full SHA f5fc579View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff defe53f...f5fc579