-
Notifications
You must be signed in to change notification settings - Fork 73
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
dev: fix some mypy
errors and switch to ruff
#511
Conversation
* Remove unused function signatures.
* Remove unused import modules.
* Clarify that `sides` in `CellStyleBorders` does not support `ColumnExpr`.
* Move `_flatten_list()` to `_utils.py`
* Use `_flatten_list()` to deduplicate formatted cells in `_migrate_unformatted_to_output()`.
* Refactor `ColumnAlignment` to a `TypeAlias` as the `Enum` definition is unused in the code. * Propose preserving the signatures of `__new__()` and `__init__()` in `Boxhead`.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #511 +/- ##
==========================================
+ Coverage 89.38% 89.71% +0.32%
==========================================
Files 45 45
Lines 5239 5202 -37
==========================================
- Hits 4683 4667 -16
+ Misses 556 535 -21 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Thanks so much for stripping so much dead code and fixing types. We're working on completing a pyopensci review for Great Tables, which recommended linting for unused imports (pyOpenSci/software-submission#202 (comment)). I think we disabled unused imports and unused variables from our linter, when we did a very early refactor. Rich and I are going to pair tomorrow to re-enable more linting rules, so we can stick to the level of quality in this PR 😅. If it's okay, we'll just add to this PR and then merge. |
Wow, that’s great! It’s exciting to see so many valuable suggestions for this project. Personally, I’d recommend we clean up the issues—for example, closing those that have already been addressed or answered. |
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.
LGTM!
mypy
errorsmypy
errors and switch to ruff
Hello team,
I ran
mypy
on our codebase and resolved around 60 reported errors in this PR (leaving 300+ errors still to address). Most of the changes involve refining type hints.Based on my observations,
mypy
seems to struggle with the following scenarios:DataFrame
backend.GTSelf
is aTypeVar
forGTData
, which causes manyGT
attributes to be flagged as "not found."None
, which can be challenging to annotate correctly.Feel free to accept, reject, or modify anything in this PR.