Skip to content

Conversation

@bernhardkaindl
Copy link
Contributor

@bernhardkaindl bernhardkaindl commented Sep 23, 2025

  • Remove the temporary exclusion of xcp/dmv.py from the diff/patch-coverage analysis
  • Update CI to pass again, fails currently due to a 0.1% calculation change.
  • Remove buggy typing stub, use the real package now instead.

A simple PR without product code changes to fix CI, and remove an obsolete, broken typing stub

Pull Request Overview, based on Copilot, extended with explanations

This PR fixes CI issues by adjusting test coverage thresholds and removing an obsolete typing stub file for pytest_httpserver to resolve mypy conflicts.

  • Lowered test coverage threshold from 96% to 95% to prevent CI failures
    • The coverage percentage calculation apparently is/was off by 0.1%, adjust the threshold
  • Removed exclusion of xcp/dmv.py from diff-cover analysis
    • xcp/dmv.py was added a month ago, and initially, it had no tests. Now it has tests
  • Deleted obsolete typing stub file pytest_httpserver.pyi to fix mypy issues
    • This typing stub was initially added for type checking, but we use the real package now instead.
    • Fixes this error about an invalid enum in it:
      stubs/pytest_httpserver.pyi:79: error: Detected enum
      "pytest_httpserver.HandlerType" in a type stub with zero members. There is a
      Chances are this is due to a recent change in the semantics of enum membership. If
      so, use `member = value` to mark an enum member, instead of `member: type`
      [misc]
          class HandlerType(Enum):
          ^
      stubs/pytest_httpserver.pyi:79: note: See
      https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
    Because we can use the upstream package now for type checking, remove the obsolete broken file.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tox.ini Adjusted test coverage threshold and removed file exclusion from diff-cover
stubs/pytest_httpserver.pyi Completely removed obsolete typing stub file

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

@codecov
Copy link

codecov bot commented Sep 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff           @@
##           master    #177   +/-   ##
======================================
  Coverage    83.3%   83.3%           
======================================
  Files          23      23           
  Lines        3347    3347           
======================================
  Hits         2790    2790           
  Misses        557     557           

@bernhardkaindl bernhardkaindl changed the title Update CI to pass again; cleanup stub pytest_httpserver.pyi to fix mypy [fix a mypy warning]: cleanup stub pytest_httpserver.pyi to fix mypy Sep 26, 2025
@bernhardkaindl bernhardkaindl force-pushed the mypy-Remove-obsolete-typing-stub-pytest_httpserver branch from f43eb6d to 18a1741 Compare September 26, 2025 07:31
@bernhardkaindl bernhardkaindl merged commit 4a7c35a into xenserver:master Sep 26, 2025
8 checks passed
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