fix: cleanup code
Summary by Sourcery
Clean up test code and lint configuration by removing redundant type imports in TYPE_CHECKING blocks and re-enabling unused import detection.
Enhancements:
- Simplify TYPE_CHECKING blocks in test files by replacing imported type definitions with a pass statement to reduce boilerplate.
Build:
- Remove ‘F401’ (unused import) from lint.ignore in pyproject.toml to enforce unused import detection.
Reviewer's guide (collapsed on small PRs)
Reviewer's Guide
This PR removes redundant type-only imports from test modules and tightens linting rules by re-enabling unused-import checks.
File-Level Changes
| Change | Details | Files |
|---|---|---|
| Clean up TYPE_CHECKING blocks in test files |
|
tests/test_dict2xml.pytests/test_utils.py |
| Re-enable unused-import linting |
|
pyproject.toml |
Tips and commands
Interacting with Sourcery
-
Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
-
Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with
@sourcery-ai issueto create an issue from it. -
Generate a pull request title: Write
@sourcery-aianywhere in the pull request title to generate a title at any time. You can also comment@sourcery-ai titleon the pull request to (re-)generate the title at any time. -
Generate a pull request summary: Write
@sourcery-ai summaryanywhere in the pull request body to generate a PR summary at any time exactly where you want it. You can also comment@sourcery-ai summaryon the pull request to (re-)generate the summary at any time. -
Generate reviewer's guide: Comment
@sourcery-ai guideon the pull request to (re-)generate the reviewer's guide at any time. -
Resolve all Sourcery comments: Comment
@sourcery-ai resolveon the pull request to resolve all Sourcery comments. Useful if you've already addressed all the comments and don't want to see them anymore. -
Dismiss all Sourcery reviews: Comment
@sourcery-ai dismisson the pull request to dismiss all existing Sourcery reviews. Especially useful if you want to start fresh with a new review - don't forget to comment@sourcery-ai reviewto trigger a new review!
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others.
- Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 100.00%. Comparing base (5f226ca) to head (d737811).
Additional details and impacted files
@@ Coverage Diff @@
## master #248 +/- ##
===========================================
+ Coverage 99.30% 100.00% +0.69%
===========================================
Files 3 3
Lines 288 288
===========================================
+ Hits 286 288 +2
+ Misses 2 0 -2
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 100.00% <100.00%> (+0.69%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.