fix(tests): resolve ruff F821 errors for DuplicateTest in test_duplicates.py#148
Merged
jacobdadams merged 2 commits intodel-bugfrom Mar 20, 2026
Merged
fix(tests): resolve ruff F821 errors for DuplicateTest in test_duplicates.py#148jacobdadams merged 2 commits intodel-bugfrom
jacobdadams merged 2 commits intodel-bugfrom
Conversation
…dule level Co-authored-by: jacobdadams <38168030+jacobdadams@users.noreply.github.com> Agent-Logs-Url: https://github.com/agrc/sweeper/sessions/ba6f55df-5b0c-43fd-a7dd-25596cf24014
Copilot
AI
changed the title
[WIP] [WIP] Address feedback on test linting issues in Sweeper PR
fix(tests): resolve ruff F821 errors for DuplicateTest in test_duplicates.py
Mar 20, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## del-bug #148 +/- ##
==========================================
Coverage ? 36.43%
==========================================
Files ? 13
Lines ? 785
Branches ? 139
==========================================
Hits ? 286
Misses ? 492
Partials ? 7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jacobdadams
approved these changes
Mar 20, 2026
jacobdadams
added a commit
that referenced
this pull request
Mar 23, 2026
…ates.py (#148) * Initial plan * fix(tests): resolve ruff F821 errors by importing DuplicateTest at module level Co-authored-by: jacobdadams <38168030+jacobdadams@users.noreply.github.com> Agent-Logs-Url: https://github.com/agrc/sweeper/sessions/ba6f55df-5b0c-43fd-a7dd-25596cf24014 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jacobdadams <38168030+jacobdadams@users.noreply.github.com>
Merged
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.
Ruff could not statically resolve
DuplicateTestbecause it was injected into module globals dynamically viaglobals()["DuplicateTest"] = _DuplicateTestinside a pytest fixture.Changes
sys.modulespatching forarcpy, its submodules, andxxhashis now done at module level before a directfrom sweeper.sweepers.duplicates import DuplicateTest, making the name statically visible to ruff. Uses# ruff: isort: off/onguards to suppress the intentional import order violation — consistent withtest_addresses.py._restore_sys_modulesmodule-scoped fixture undoes thesys.modulespatching after all tests in the module complete, preserving test isolation.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.