Conversation
AGENTS.md and STYLEGUIDE.md require `from __future__ import annotations` in every source file, but no lint rule checked it. Turn on ruff's isort required-imports (I002) for packages/*/src and add the import to the 16 src __init__.py files that lacked it. FA102 would not help here: it only fires when the target is Python 3.9 or older, and the project targets py310. I002 skips files with no statements, so it guards every src file with code, including re-export __init__.py modules; the header-only stubs get the import anyway. Signed-off-by: ChethanUK <chethanuk@outlook.com>
Linked Issue CheckIssue #760 has not been triaged yet. A maintainer needs to review You can continue working on the PR in the meantime. The check will |
|
Stale PR reminderThis PR has had failing checks for 7 days without activity. Failing checks: check Please push an update or leave a comment if you're still working on this. To prevent auto-close, add the |
📋 Summary
AGENTS.md and STYLEGUIDE.md require
from __future__ import annotationsin every source file, but nothing enforces it, and 16__init__.pyfiles underpackages/*/srcdon't have it. This adds ruff'srequired-imports(I002) forpackages/*/srcand adds the import to those files.🔗 Related Issue
Closes #760
🔄 Changes
I002instead of theFA102the issue suggests.FA102only fires for targets below py310, so withtarget-version = "py310"it passes onmaineven with these files missing the import."!packages/*/src/**" = ["I002"]in per-file-ignores keeps tests,tests_e2eand scripts out of scope.I002skips files with no statements, so 14 of the 16 files (header-only stubs) get the import but aren't guarded until they have code.🧪 Testing
make testpassesmake lintpasses. Deleting the import fromengine/storage/__init__.pygivesI002 Missing required import; an existing tests file without it (config/analysis/conftest.py) is not flagged.pytest packages/data-designer-engine/tests/engine/storage packages/data-designer/tests/integrationspasses (158 tests).✅ Checklist