-
Notifications
You must be signed in to change notification settings - Fork 164
Open
Description
User Story
As a Backend.AI developer, I want to enable FA (flake8-annotations) rules to ensure complete type annotations across the codebase so that code quality and maintainability are improved.
Background
FA rules enforce type annotations on functions, methods, and variables. This ensures:
- All function parameters have type hints
- All function return types are annotated
- Class attributes and variables are properly typed
- No implicit
Anytypes
Implementation Details
- Enable FA rules in ruff configuration (FA100, FA102, etc.)
- Add missing type annotations to functions and methods
- Add missing return type annotations
- Add type hints to class attributes and module-level variables
- Fix all existing FA violations across the codebase
- Update code style guidelines to require type annotations
Acceptance Criteria
- FA rules are enabled in ruff.toml
- All existing violations are fixed
- All functions have parameter and return type annotations
- Class attributes have type annotations
- CI/CD linter checks pass
- Code style documentation is updated
Technical Notes
- May be a large effort depending on existing violations
- Consider gradual rollout per package
- Use mypy to verify type correctness
- Avoid using
Anytype where possible
JIRA Issue: BA-4057
Metadata
Metadata
Assignees
Labels
No labels