Skip to content
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

Refactor: Fixed and enforced types + logger class rewrite #201

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

Root-Core
Copy link
Contributor

Cherry-picked and adopted from #152

This PR fixes issues that were found in the static typing analysis and other bad practices / issues with types.

I included the rather trivial rewrite of the logger class.
It uses constants quite a lot and benefits greatly from the shift towards enums.

- Correctly override optionxform
- String can not be None
- Fixed import of urllib
- Exit if game id is not present
- Allow paths to be str or Path
- use print functions instead of manual
- class methods
- caching
- format string
- Changed ruff's docstring style to "google"
- Removed ignored ruff rules, that are already satisfied
- Ignore missing cls annotations (ANN102)
- Added docstrings to Config and ConfigBase (+Engine)
- Logger: use Enum values for colors
- Use default parameters, if argument is equal
@Root-Core Root-Core changed the title Refactor: Fixing and enforcing types + rewriting logger class Refactor: Fixing and enforcing types + logger class rewrite Jan 9, 2025
@Root-Core Root-Core changed the title Refactor: Fixing and enforcing types + logger class rewrite Refactor: Fixed and enforced types + logger class rewrite Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant