Skip to content

Commit

Permalink
Add type hints to test_utils.py (#1997)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex committed Jun 8, 2023
1 parent 3924ef4 commit 7d4eab2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 5 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ combine-as-imports = true
disallow_untyped_defs = true
ignore_missing_imports = true
follow_imports = "silent"
# NOTE: If you are seeing this, feel free to create a PR to cover the below files.
exclude = """(?x)
^(
|tests/protocols/test_utils.py
)$
"""

[[tool.mypy.overrides]]
module = "tests.*"
Expand All @@ -96,10 +90,14 @@ filterwarnings = [
[tool.coverage.run]
source_pkgs = ["uvicorn", "tests"]
plugins = ["coverage_conditional_plugin"]
omit = [
"uvicorn/workers.py",
"uvicorn/__main__.py",
]

[tool.coverage.report]
precision = 2
fail_under = 96.57
fail_under = 98.10
show_missing = true
skip_covered = true
exclude_lines = [
Expand Down
3 changes: 2 additions & 1 deletion tests/protocols/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import socket
from asyncio import Transport

import pytest

Expand All @@ -18,7 +19,7 @@ def getsockname(self):
return self.sockname


class MockTransport:
class MockTransport(Transport):
def __init__(self, info):
self.info = info

Expand Down

0 comments on commit 7d4eab2

Please sign in to comment.