-
Notifications
You must be signed in to change notification settings - Fork 34
Address code review feedback: fix import pollution and add missing UIClassifier enum #1926
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
- Replace wildcard imports with explicit enum re-exports in __init__.py - Remove redundant enum conversion logic in create_server_config (ServerConfig.__init__ already handles it) - Add type: ignore comments for mypy limitations with attrs constructors Co-authored-by: iMicknl <1424596+iMicknl@users.noreply.github.com>
Co-authored-by: iMicknl <1424596+iMicknl@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
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.
Pull request overview
Refactors enum exports and server config creation to address review feedback by reducing namespace pollution from wildcard imports and removing duplicated enum coercion logic.
Changes:
- Replaced
pyoverkiz/enums/__init__.pywildcard imports with explicit enum re-exports via a fixed__all__list. - Simplified
create_server_config()inpyoverkiz/utils.pyby removing local string→enum conversion and addingtype: ignoremarkers.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pyoverkiz/utils.py | Removes local enum coercion when constructing ServerConfig. |
| pyoverkiz/enums/init.py | Switches to explicit re-exports to prevent leaking helper/imported names into pyoverkiz.enums. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add UIClassifier to enum exports (was accidentally omitted) - Restore explicit enum conversion in create_server_config for type safety - While ServerConfig.__init__ does convert, explicit conversion is safer and clearer Co-authored-by: iMicknl <1424596+iMicknl@users.noreply.github.com>
Remove the explicit enum conversion in create_server_config and rely on ServerConfig.__init__ to handle the conversion. This is the cleaner approach preferred by the maintainer. Co-authored-by: iMicknl <1424596+iMicknl@users.noreply.github.com>
Progress Plan
Changes
This PR addresses code review feedback on the enum refactoring by:
Replacing wildcard imports with explicit enum re-exports in
pyoverkiz/enums/__init__.pyUIClassifier)StrEnum,Enum,unique, etc. no longer leak into package)Simplifying enum conversion in
pyoverkiz/utils.pycreate_server_config()passes values directly toServerConfigServerConfig.__init__()to handle string → enum conversion internally# type: ignore[arg-type]comments for mypy compatibilityTesting
create_server_config()properly converts strings to enums viaServerConfig.__init__()✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.