| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Add a few additional annotations
Update subsample and zoom method signatures
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add Python 3.15 TypedDict attributes * Use AnnotationForm for TypedDict extra items
…manually" invoking Black (python#15909)
* `typing_extensions`: re-export `builtins.sentinel` on Python 3.15+ This would make ty's implementation of `builtins.sentinel` a little easier * Update typing_extensions.pyi * Update typing_extensions version to 4.16.0rc1 * Update typing_extensions.pyi * allow * a surprise, to be sure, but a welcome one * Update stdlib/typing_extensions.pyi * harmonize builtins and typing_extensions, fix various `__(r)or__` methods * Apply suggestions from code review
See python#15947 for details. Closes: python#15942
* Update typing_extensions.TypeVarTuple with new backported features * Update typing_extensions to 4.16.0rc2 --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
…inct (python#15949) it would be too easy for an eager contributor to revert python@4531374 in the name of simplifying the stub
* Add typed fields, queries, and update to some of the new APIs * Type the field classes * Type query results * Mark kwargs TypedDicts type_check_only and fix TypedDict import * Instead of separating get/set, just override for BigBitField.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Update most test/lint dependencies * Update metadata.py --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
…fect While existing examples of changing a class to an alias, such as `shutil.ExecError` -> `RuntimeError` and `socket.timeout` -> `TimeoutError`, use `<old> = <new>` syntax, this change causes issues for typing.Union in particular. The syntax creates an intermediary TypeAlias object, which is an issue in this particular case because mypy asserts that `types.UnionType` is an actual type, and not an alias pointing to another type. Instead, the code employs a technique regularly used by typing_extensions, and imports the new type under the pseudonym of the old type.
Previous commit message was also amended to slightly better explain how the crash fix actually works
- removed some inaccurate notes left over from when Viicos copied types.UnionType - added optional `@classmethod` decorator to `typing.Union.__class_getitem__`, to be in line with `typing._Generic.__class_getitem__` - make args of `typing.Union.__class_getitem__` positional, as per stubtest instruction
for purposes of passing certain stubtests that would otherwise fail due to outdated stubs
|
Latest commit (#2eccc22 ) fixes issue found when running test cases on python 3.14 & 3.15, across all operating systems Issue in questionSource: https://github.com/LordGiacomoS/typeshed/actions/runs/29354539513/job/87161643214#step:4 mypy --platform {linux, darwin, win32} --python-version {3.14, 3.15} on the standard library test cases: FAILURE
stdlib/@tests/test_cases/check_types.py:82: error: Expression is of type
"<typing special form>", not "Never | Any" [assert-type]
assert_type(union_type | Literal[1], types.UnionType | Any)
^
|
Sorry, something went wrong.
|
The changes to builtins.type.__or__ & builtins.type.__ror__ (changes to stdlib/builtins.pyi in 40d9f63) currently break mypy's handling of unions and that fact, combined with how messy this branch is (due to tacking on a number of other commits as a brute force approach to solving a specific problem) and the lack of visibility/feedback here, leads me to believe that closing this PR, cleaning up the changes, and opening one on the mainline typeshed repo is the best approach to solve these issues. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes crash in mypy (python/mypy#21588) that caused deferral of this branch's PR (python/typeshed#13740) on the main typeshed, because while the crash could be solved in mypy, it seems more prudent to use this typeshed-based solution. Solutions that would modify mypy's code would introduce a redundant version check and still have the crash if an up-to-date version of typeshed isn't used. The exact changes that fix the crash are specifically the changes to stdlib/types.pyi in 76cf69a).
Other minor corrections:
Remaining Concerns:
Stubtests: https://github.com/LordGiacomoS/typeshed/actions/runs/29355015820 (runs a different branch to allow me to use modified version of mypy to fix more minor errors that aren't in scope of crash specifically)
Stubtest errors excerptTests: https://github.com/LordGiacomoS/typeshed/actions/runs/28957923025
Sourced from: https://github.com/LordGiacomoS/typeshed/actions/runs/28900665825/job/85736371504