Repository navigation
[shapely] Changes for new features and updates made in Release 2.2.0 #16562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jack-volantautonomy
wants to merge
18
commits into
python:main
Choose a base branch
from
jack-volantautonomy:shapely-2_2_0-typeshed-update
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
8f13614
First few fixes
jack-volantautonomy e9b8144
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7351f3a
Remove overload
jack-volantautonomy 84d2fa0
Upgrade version
jack-volantautonomy b4222da
More work in progress
jack-volantautonomy 7f06bac
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b0c4ca4
More changes
jack-volantautonomy 1f296a6
Allowlist scalar functions
jack-volantautonomy 8594e37
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] a1ecf68
Remaining changes
jack-volantautonomy 0d47cff
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] eb22840
Comments
jack-volantautonomy 4fa6d4c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 0c317a4
Tweaks
jack-volantautonomy 6c4362c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5585172
Sorted out
jack-volantautonomy e0b9a43
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] dc6243d
FIxes
jack-volantautonomy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| version = "2.1.*" | ||
| version = "2.2.*" | ||
| upstream-repository = "https://github.com/shapely/shapely" | ||
| # Requires a version of numpy with a `py.typed` file | ||
| dependencies = ["numpy>=1.20"] | ||
| dependencies = ["numpy>=1.26"] | ||
| requires-python = ">=3.11" |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,2 @@ | ||
| from typing import TypedDict | ||
|
|
||
| version_json: str | ||
| _Versions = TypedDict("_Versions", {"date": str, "dirty": bool, "error": None, "full-revisionid": str, "version": str}) | ||
|
|
||
| def get_versions() -> _Versions: ... | ||
| __git_version__: str | ||
|
jack-volantautonomy marked this conversation as resolved.
Resolved
|
||
| __version__: str | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| from collections.abc import Callable | ||
| from collections.abc import Callable, Sequence | ||
| from typing import Literal, overload | ||
|
|
||
| import numpy as np | ||
| from numpy.typing import NDArray | ||
| from numpy.typing import ArrayLike, NDArray | ||
|
|
||
| from ._typing import ArrayLikeSeq, GeoArray, GeoT, OptGeoArrayLike, OptGeoArrayLikeSeq, OptGeoT | ||
|
|
||
| __all__ = ["transform", "count_coordinates", "get_coordinates", "set_coordinates"] | ||
| __all__ = ["transform", "count_coordinates", "get_coordinates", "set_coordinates", "transform_coordseq"] | ||
|
|
||
| @overload | ||
| def transform( | ||
|
|
@@ -25,6 +25,39 @@ def transform( | |
| interleaved: bool = True, | ||
| ) -> GeoArray: ... | ||
|
|
||
| @overload | ||
| def transform_coordseq( | ||
| geometry: OptGeoT, | ||
| transformation: Callable[[NDArray[np.float64]], NDArray[np.float64]], | ||
| *, | ||
| include_z: bool | None = False, | ||
| interleaved: bool = True, | ||
| ) -> OptGeoT: ... | ||
| @overload | ||
| def transform_coordseq( | ||
| geometry: OptGeoArrayLikeSeq, | ||
| transformation: Callable[[NDArray[np.float64]], NDArray[np.float64]], | ||
| *, | ||
| include_z: bool | None = False, | ||
| interleaved: bool = True, | ||
| ) -> GeoArray: ... | ||
|
Comment on lines
+28
to
+43
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorted |
||
| @overload | ||
| def transform_coordseq( | ||
| geometry: OptGeoT, | ||
| transformation: Callable[..., Sequence[ArrayLike] | NDArray[np.float64]], | ||
| *, | ||
| include_z: bool | None = False, | ||
| interleaved: Literal[False], | ||
| ) -> OptGeoT: ... | ||
| @overload | ||
| def transform_coordseq( | ||
| geometry: OptGeoArrayLikeSeq, | ||
| transformation: Callable[..., Sequence[ArrayLike] | NDArray[np.float64]], | ||
| *, | ||
| include_z: bool | None = False, | ||
| interleaved: Literal[False], | ||
| ) -> GeoArray: ... | ||
|
|
||
| def count_coordinates(geometry: OptGeoArrayLike) -> int: ... | ||
|
|
||
| @overload | ||
|
|
||
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.