Merged
Conversation
reorder types on some type comments
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRemoves legacy enum34/types-enum34 dependencies and aligns type annotations so that runtime and stub signatures match, primarily by reordering Union arguments to put str/unicode first and non-string types last. Class diagram for updated method Union argument orderingclassDiagram
class Matcher {
+replaceAll(arg: Union[str, unicode, Function]) Union[str, unicode]
+replaceFirst(arg: Union[str, unicode, Function]) Union[str, unicode]
}
class Path {
+endsWith(other: Union[str, unicode, Object, Path]) bool
}
class Currency {
+getInstance(arg: Union[str, unicode, Locale]) Currency
}
class Function
class Object
class Locale
Matcher --> Function
Path --> Object
Path --> Path
Currency --> Locale
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- Given that
python_requiresis still pinned to==2.7.18, double‑check that nothing injava-apirelies on theenumbackport fromenum34(e.g.,from enum import Enumusages) since Python 2’s stdlib doesn’t provideenumand this removal could cause runtime import errors. - After dropping
types-enum34, scan thejava-api-stubspackage for any remaining references toenum34or its types to avoid mypy or type-checking failures due to missing stubs.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Given that `python_requires` is still pinned to `==2.7.18`, double‑check that nothing in `java-api` relies on the `enum` backport from `enum34` (e.g., `from enum import Enum` usages) since Python 2’s stdlib doesn’t provide `enum` and this removal could cause runtime import errors.
- After dropping `types-enum34`, scan the `java-api-stubs` package for any remaining references to `enum34` or its types to avoid mypy or type-checking failures due to missing stubs.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
reorder types on some type comments
Summary by Sourcery
Remove legacy enum34 and types-enum34 dependencies and adjust related type annotations for consistency.
Bug Fixes:
Enhancements:
Build: