Enhances our ruff configurations to enforce comprehensive standards across various aspects of code quality, including style, formatting, structure, complexity, security, bug prevention, and documentation.
Details
Changes Implemented:
Code Style and Formatting:
Enforced PEP 8 conventions, including spacing, indentation, and line length.
Included isort for consistent import sorting.
Added rules for trailing commas, commented-out code, import conventions, naming conventions, and quote usage.
Code Structure and Complexity:
Simplified complex expressions and improved readability.
Applied best practices for list, set, and dict comprehensions.
Checked for overly complex code using cyclomatic complexity.
Code Security and Bug Prevention:
Detected unused function arguments, boolean traps, and implicit string concatenations.
Prevented common programming mistakes and potential bugs.
Enforced correct exception handling and detected security issues.
Code Documentation:
Ensured adherence to documentation standards.
Detected unresolved FIXMEs and other temporary comments.
Files Modified:
.pre-commit-config.yaml: Updated configurations to include new ruff rules and standards.
pyproject.toml: Extended ruff linting rules to cover additional checks for various code quality aspects.
Source and test files: Applied necessary changes to comply with the new ruff configurations, including refactoring code, updating documentation, and adding comments.
Test Plan:
Automated Testing:
Automated tests updated to run the latest changes
Manual Testing:
Manually reviewed changes to ensure they align with the updated linting standards.
Summary
Enhances our
ruff
configurations to enforce comprehensive standards across various aspects of code quality, including style, formatting, structure, complexity, security, bug prevention, and documentation.Details
Changes Implemented:
isort
for consistent import sorting.Files Modified:
.pre-commit-config.yaml
: Updated configurations to include new ruff rules and standards.pyproject.toml
: Extended ruff linting rules to cover additional checks for various code quality aspects.Test Plan: