Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cbv/importer/importers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
)


class CodeImporter(Protocol):
class CodeImporter(Protocol): # nocoverage: protocol
def generate_code_data(self) -> Iterator[CodeElement]: ...


Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ dynamic_context = "test_function"
[tool.coverage.report]
show_missing = true
skip_covered = true
exclude_lines = [
# Protocol classes are abstract, and don't need coverage.
"nocoverage: protocol",
]

[tool.coverage.html]
show_contexts = true
Expand Down
2 changes: 1 addition & 1 deletion tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .factories import KlassFactory, ProjectVersionFactory


class AssertNumQueriesFixture(Protocol):
class AssertNumQueriesFixture(Protocol): # nocoverage: protocol
def __call__(self, num: int, exact: bool = True) -> CaptureQueriesContext: ...


Expand Down