| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
I only got up to D, but this looks generally good.
Sorry, something went wrong.
|
|
||
| def close(__fd: _FD) -> None: ... | ||
| def dup(__fd: _FD) -> int: ... | ||
| def close(__fd: SupportsIndex) -> None: ... |
There was a problem hiding this comment.
We also have a _typeshed.FileDescriptor alias but it's just int. No change needed in this PR, but might be worth looking into whether we can make that alias usable here.
Sorry, something went wrong.
|
So, this crashes mypy: Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "mypy/semanal.py", line 6539, in accept File "mypy/nodes.py", line 1310, in accept File "mypy/semanal.py", line 2889, in visit_assignment_stmt File "mypy/semanal.py", line 3393, in process_type_annotation File "mypy/semanal.py", line 6690, in anal_type File "mypy/types.py", line 955, in accept File "mypy/typeanal.py", line 259, in visit_unbound_type File "mypy/typeanal.py", line 399, in visit_unbound_type_nonoptional File "mypy/typeanal.py", line 6[24](https://github.com/python/typeshed/actions/runs/7411345628/job/20165674610?pr=11238#step:5:25), in try_analyze_special_unbound_type File "mypy/typeanal.py", line 1470, in analyze_literal_type File "mypy/typeanal.py", line 1484, in analyze_literal_param File "mypy/typeanal.py", line 1738, in named_type File "mypy/typeanal.py", line [25](https://github.com/python/typeshed/actions/runs/7411345628/job/20165674610?pr=11238#step:5:26)6, in lookup_fully_qualified File "mypy/semanal.py", line 5852, in lookup_fully_qualified AssertionError: builtins.str mypy fails to find builtins.str which seems weird. I reverted stdlib/builtins.pyi, but that had no effect. |
Sorry, something went wrong.
I'm guessing there is some disturbance in the builtin import cycle. Possibly because the collections import was removed from typing.pyi. |
Sorry, something went wrong.
|
The jinja2 warning is in a Python 3.7 code branch. |
Sorry, something went wrong.
|
Thanks for working on this! One request, can we merge #11219 first? |
Sorry, something went wrong.
There was a problem hiding this comment.
E-M looked good, and I have faith in you and our tests for the rest
Sorry, something went wrong.
|
Diff from mypy_primer, showing the effect of this PR on open source code: spack (https://github.com/spack/spack)
+ lib/spack/spack/install_test.py:520: error: Unused "type: ignore" comment [unused-ignore]
+ lib/spack/spack/install_test.py:522: error: Unused "type: ignore" comment [unused-ignore]
jinja (https://github.com/pallets/jinja)
+ src/jinja2/debug.py:130: error: Argument 6 to "CodeType" has incompatible type "bytes"; expected "int" [arg-type]
+ src/jinja2/debug.py:131: error: Argument 7 to "CodeType" has incompatible type "Tuple[Any, ...]"; expected "bytes" [arg-type]
+ src/jinja2/debug.py:134: error: Argument 10 to "CodeType" has incompatible type "str"; expected "Tuple[str, ...]" [arg-type]
+ src/jinja2/debug.py:136: error: Argument 12 to "CodeType" has incompatible type "int"; expected "str" [arg-type]
+ src/jinja2/debug.py:137: error: Argument 13 to "CodeType" has incompatible type "bytes"; expected "int" [arg-type]
+ src/jinja2/debug.py:138: error: Argument 14 to "CodeType" has incompatible type "Tuple[str, ...]"; expected "bytes" [arg-type]
+ src/jinja2/ext.py:297: error: Incompatible redefinition (redefinition with type "Callable[[Arg(str, 'c'), Arg(str, 's')], str]", original type "Callable[[Arg(str, 'context'), Arg(str, 'message')], str]") [misc]
+ src/jinja2/ext.py:304: error: Incompatible redefinition (redefinition with type "Callable[[Arg(str, 'c'), Arg(str, 's'), Arg(str, 'p'), Arg(int, 'n')], str]", original type "Callable[[Arg(str, 'context'), Arg(str, 'msgid1'), Arg(str, 'msgid2'), Arg(int, 'n')], str]") [misc]
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Part of #10113