Skip to content

chore: remove unnecessary noqa E402 from shim modules (#771)#772

Open
oboehmer wants to merge 2 commits intomainfrom
chore/771-remove-noqa-e402
Open

chore: remove unnecessary noqa E402 from shim modules (#771)#772
oboehmer wants to merge 2 commits intomainfrom
chore/771-remove-noqa-e402

Conversation

@oboehmer
Copy link
Copy Markdown
Collaborator

Summary

  • Move warnings.warn() after imports in both shim modules (nac_test/pabot.py, nac_test/robot_writer.py)
  • Remove # noqa: E402 suppressions that were only needed due to the previous ordering

The deprecation warning fires at import time regardless of where it appears in the module — no functional change.

Closes

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring / Technical debt (internal improvements with no user-facing changes)
  • Documentation update
  • Chore (build process, CI, tooling, dependencies)
  • Other (please describe):

Testing Done

  • All existing tests pass (19/19: 17 unit + 2 integration)
  • Pre-commit clean

Checklist

  • Code follows project style guidelines (pre-commit run -a passes)
  • Self-review of code completed
  • No new warnings introduced

Move warnings.warn() after imports — the deprecation warning fires at
import time regardless of ordering within the module. This eliminates
the need for noqa E402 suppressions on the internal imports.
@oboehmer oboehmer requested a review from danischm April 15, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: remove unnecessary noqa E402 from shim modules

1 participant