-
-
Notifications
You must be signed in to change notification settings - Fork 0
build(deps): remove enum34/types-enum34 #2
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
Conversation
reorder types on some type comments
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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: