NVIDIA-NeMo / NVIDIA-NeMo/DataDesigner

enforce \from future import annotations` via ruff FA102 rule`

Open Beginner friendly
#760 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

task
Dominant language
Python
Stars
2.2k
Forks
211
Avg merge
2d 6h
Merged PRs (30d)
40

Description

Priority Level

Low

Task Summary

Add FA102 to the ruff lint ruleset and add from future import annotations to the 16 source files currently missing it.

AGENTS.md declares from future import annotations a structural invariant ("required in every Python source file"), but the ruff select list in pyproject.toml does not include
the FA ruleset, so violations go undetected. Currently 16 src/ files are missing the import.

Technical Details & Implementation Plan

Two changes:

  1. pyproject.toml — add "FA102" to [tool.ruff.lint] select. FA102 flags files that use PEP 604/585 type syntax or have no annotations at all but are missing the future import. This
    matches the project's stated invariant without being overly strict.
  2. 16 source files — add from future import annotations after the SPDX header. All are either empty init.py files (just the license header) or re-export modules. make
    check-all-fix will auto-apply these once the rule is enabled.

Affected files:

  • packages/data-designer/src/data_designer/integrations/huggingface/init.py
  • packages/data-designer/src/data_designer/cli/commands/init.py
  • packages/data-designer-engine/src/data_designer/engine/init.py
  • packages/data-designer-engine/src/data_designer/engine/column_generators/init.py
  • packages/data-designer-engine/src/data_designer/engine/column_generators/generators/init.py
  • packages/data-designer-engine/src/data_designer/engine/dataset_builders/utils/init.py
  • packages/data-designer-engine/src/data_designer/engine/models/init.py
  • packages/data-designer-engine/src/data_designer/engine/models/parsers/init.py
  • packages/data-designer-engine/src/data_designer/engine/processing/init.py
  • packages/data-designer-engine/src/data_designer/engine/processing/ginja/init.py
  • packages/data-designer-engine/src/data_designer/engine/processing/gsonschema/init.py
  • packages/data-designer-engine/src/data_designer/engine/processing/processors/init.py
  • packages/data-designer-engine/src/data_designer/engine/resources/init.py
  • packages/data-designer-engine/src/data_designer/engine/sampling_gen/entities/init.py
  • packages/data-designer-engine/src/data_designer/engine/storage/init.py
  • packages/data-designer-config/src/data_designer/config/analysis/init.py

Verification: make check-all-fix && make test

Investigation / Context

AGENTS.md states under Structural Invariants:

▎ from future import annotations — required in every Python source file.

The current ruff select in pyproject.toml covers W, F, I, ICN, PIE, TID, UP006, UP007, UP045 — but not FA. Without FA102, the invariant is undeclared to the linter and violations
accumulate silently.

Agent Plan / Findings

Investigated with Claude Code. Grep across all three packages confirmed:

  • 16 src/ files missing from future import annotations (confirmed with grep -rL "from future import annotations" packages/ --include="*.py" | grep src/)
  • No FA rule in pyproject.toml ruff config
  • No import-direction violations, no skipped tests, no other structural invariant violations found
  • Fix is fully automatable: add rule → run make check-all-fix → all 16 files are patched by ruff
Dependencies

None.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in pyproject.toml by locating the [tool.ruff.lint] select list, then inspect the 16 init.py paths listed in the issue. Enable FA102 and use make check-all-fix to apply the imports. Done means all affected files contain the future import and make check-all-fix && make test passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.