-
Notifications
You must be signed in to change notification settings - Fork 22
Typing and Splitting Files for Readability #36
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
Added typing via codex
|
@traversaro : can you take a look at this? Since it's my PR, I want to make sure you're ok with it before merging. |
Thanks for asking, the PR seems great! My only doubt is the ruff/mypy versions. It seems that the pre-commit is using a relatively old ruff and mypy version, while the CI use the latest version. Is that intentional? |
|
Fixed! |
The goal of this PR is to improve the readability of Urchin. I've often found that it's difficult to grok the codebase because everything lives in a single file and has no types. This PR splits things into separate files based on the type of object it is and adds types.
I think there could be another, future version that involves better typing but this would require a much more significant rewrite. In the meantime, this version will improve things without doing any major surgery.
Since this is still a pretty major internal change, I've ensured that all the existing tests pass without much modification.
Also, this PR drops support for unsupported versions of Python (<3.9). Users of this package that want to keep using these Python versions would have to install an earlier version. Python 3.8 had EOL in late 2024.