Typing and Splitting Files for Readability#36
Merged
fishbotics merged 15 commits intofishbotics:mainfrom Oct 21, 2025
Merged
Conversation
Added typing via codex
Owner
|
@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. |
traversaro
approved these changes
Oct 21, 2025
Collaborator
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? |
Owner
|
Fixed! |
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.
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.