chore: review fix/agents guidance import lint#1285
Open
crowecawcaw wants to merge 2 commits into
Open
Conversation
Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>
Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>
crowecawcaw
marked this pull request as ready for review
July 21, 2026 22:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was the problem/requirement? (What/Why)
Agents in this codebase often put imports in functions and write long verbose comments.
What was the solution? (How)
Add a linter for imports not at the top of the file
Add AGENTS.md guidance about comments
What is the impact of this change?
Agents produce better code with less feedback.
How was this change tested?
CI
Was this change documented?
n/a
Does this PR introduce new dependencies?
No
Is this a breaking change?
No
Does this change impact security?
No
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Testing
Manually verified the new lint config locally (ruff 0.15.22 via
hatch run lint, macOS):noqa) and an unsorted__all__.hatch run ruff checkflagged both —E402 Module level import not at top of fileandRUF022 `__all__` is not sorted— and exited non-zero.# noqa: E402to the late import made the file pass, matching the existing suppressions in the tree (e.g.src/deadline/client/cli/_common.py,test/ui/conftest.py,test/blender_submitter_ui/*— deferred/bpy-gated imports).hatch run lintpasses clean on the full repo (ruff check .— all checks passed;ruff format --check— 328 files already formatted;mypy— no issues in 311 files).