Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I modified ```diff diff --git mypy/binder.py mypy/binder.py index 8a68f24f6..194883f86 100644 --- mypy/binder.py +++ mypy/binder.py @@ -345,7 +345,7 @@ class ConditionalTypeBinder: self._cleanse_key(dep) def most_recent_enclosing_type(self, expr: BindableExpression, type: Type) -> Type | None: - type = get_proper_type(type) + # type = get_proper_type(type) if isinstance(type, AnyType): return get_declaration(expr) key = literal_hash(expr) ``` to see if it still works. It is: ```python » python runtests.py self run self: ['/Users/sobolev/Desktop/mypy/.venv/bin/python', '-m', 'mypy', '--config-file', 'mypy_self_check.ini', '-p', 'mypy', '-p', 'mypyc'] mypy/binder.py:349: error: Never apply isinstance() to unexpanded types; use mypy.types.get_proper_type() first [misc] if isinstance(type, AnyType): ^~~~~~~~~~~~~~~~~~~~~~~~~ mypy/binder.py:349: note: If you pass on the original type after the check, always use its unexpanded version Found 1 error in 1 file (checked 288 source files) FAILED: self ``` I will add this plugin to my CI checks in like ~5 plugins I maintain :) - https://github.com/typeddjango/django-stubs - https://github.com/typeddjango/djangorestframework-stubs - https://github.com/dry-python/returns - https://github.com/dry-python/classes - https://github.com/wemake-services/mypy-extras Closes #16035
- Loading branch information