Repository navigation
Modernize safe uses of TypeVar/ParamSpec/TypeVarTuple to PEP 695 syntax - #11768
Open
FrancescoPezzella wants to merge 4 commits into
Open
FrancescoPezzella wants to merge 4 commits into
FrancescoPezzella wants to merge 4 commits into
Conversation
headtr1ck
reviewed
Oct 20, 2026
FrancescoPezzella
force-pushed
the
type-param-modernization
branch
from
October 21, 2026 09:52
c25feec to
39bd375
Compare
Author
|
Interesting... changing the Type Parameters to Self exposed some underlying issues with other methods that weren't caught before in facetgrid.py
Now with the generic parameter being reserved it seems that map_plot1d and map_dataarray_line were expecting a DataArray and this wasn't being caught with the Any subtype. Should this be fixed in this PR? Since the Ci/Cd is failing for now |
FrancescoPezzella
force-pushed
the
type-param-modernization
branch
from
October 25, 2026 10:35
778b09a to
1c932cb
Compare
Convert type parameters to PEP 695 syntax in 8 files (Python 3.12+). - converted to PEP 695 in functions: T (4 files), P (2 files), C, F, T_FacetGrid, T_PandasIndex, T_Resample - unused declaration removed: T_FreqStr
Note: The command only works if it sees `from typing import Self` and it is not inside a TYPE_CHECKING block Replace `from xarray.core.types import Self` with `from typing import Self` Note: There might be more instances of this, this was just a quick search with direct matches, also used `ruff check --isolated --select I001 --target-version py312 --fix` to re-organize said imports
FrancescoPezzella
force-pushed
the
type-param-modernization
branch
from
October 26, 2026 11:58
1c932cb to
81b1162
Compare
FrancescoPezzella
marked this pull request as ready for review
October 26, 2026 11:58
Author
hi im a bit confused with this response |
Collaborator
Just saying that once we fix mypy this is good to go! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Convert type parameters to PEP 695 syntax in 8 files (Python 3.12+).
Description
Checklist
AI Disclosure
This PR does not contain any AI usage. Instead, I utilize a tool of this experimental framework - https://github.com/TNO/Renaissance.Py