Skip to content

fix: Remove unused mypy type: ignore comments in Azure service tests - #235

Merged
lslebodn merged 1 commit into
mainfrom
mypy_fix
Nov 4, 2026
Merged

lslebodn merged 1 commit into
mainfrom
mypy_fix

Conversation

@lslebodn

@lslebodn lslebodn commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

A newer mypy correctly resolves the tenacity-wrapped .retry.sleep attribute, making the # type: ignore comments on these mock assignments redundant and flagged under --warn-unused-ignores.

Assisted-by: Claude Sonnet 5.5 noreply@anthropic.com

Summary by Sourcery

Enhancements:

  • Remove obsolete mypy type-ignore annotations from Azure service retry tests.

A newer mypy correctly resolves the tenacity-wrapped `.retry.sleep`
attribute, making the `# type: ignore` comments on these mock
assignments redundant and flagged under --warn-unused-ignores.

Assisted-by: Claude Sonnet 5.5 <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The PR removes six now-unnecessary # type: ignore comments from Azure publish tests because newer mypy correctly types the tenacity-wrapped retry.sleep attribute, preventing --warn-unused-ignores violations without changing test behavior.

File-Level Changes

Change Details Files
Remove redundant mypy suppression comments from retry-sleep mock assignments in Azure service tests.
  • Update six preview/live publish retry and certification-error tests to assign mocked retry sleep without unused type: ignore annotations.
  • Retain the existing retry behavior and test setup unchanged.
tests/ms_azure/test_service.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on 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 issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on 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 dismiss on 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 review to 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

@qodo-for-releng

Copy link
Copy Markdown

PR Summary by Qodo

Remove unused mypy ignores from Azure publishing tests

🐞 Bug fix 🕐 Less than 5 minutes


AI Description

• Remove six obsolete mypy suppressions from Azure preview and live publishing tests.
• Keep retry-sleep mocks intact while satisfying --warn-unused-ignores.
High-Level Assessment

Removing only the unused suppressions is appropriate: mypy now accepts the assignments, and the tests retain their existing retry behavior.

Files changed (1) +6 / -6

Bug fix (1) +6 / -6
test_service.pyRemove obsolete type ignores from retry-sleep mocks +6/-6

Remove obsolete type ignores from retry-sleep mocks

• Removes six '# type: ignore' comments from preview and live publishing tests. The mock assignments and test behavior are unchanged.

tests/ms_azure/test_service.py

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@qodo-for-releng

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Powered by Qodo

@lslebodn

Copy link
Copy Markdown
Collaborator Author

There was failure in https://github.com/release-engineering/cloudpub/actions/runs/40285823568/job/121449107472
But I wanted to merge MR t to new certifi in the MR

@ashwgit @beerparty PTAL

@lslebodn

lslebodn commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

@ashwgit @beerparty PTAL

@beer92266 beer92266 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ashwgit ashwgit left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lslebodn
lslebodn merged commit 9c79021 into main Nov 4, 2026
20 of 22 checks passed
@lslebodn
lslebodn deleted the mypy_fix branch November 4, 2026 10:21
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.

3 participants