Resolve critical Ruff linting errors and configure pre-commit #5
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.
Resolves critical code safety and correctness issues identified by Ruff linting whilst configuring pre-commit to ignore low-priority style rules.
Critical Fixes
Code Safety & Correctness
from err) for better debugging (B904: 4 fixes)type() ==comparisons withisinstance()(E721: 14 fixes)is not Noneinstead of!= None(E711: 2 fixes)download_file_from_google_drive()function (F821: 1 fix)API Exposure
__all__in package__init__.pyfiles (F401 fixes)Configuration
Updated
.pre-commit-config.yamlto ignore low-priority linting rules:Rationale: Focus pre-commit checks on critical code safety issues rather than style
preferences, whilst maintaining code functionality and test coverage.
Testing
References
Pre-commit Configuration:
Closes #4