Skip to content

Commit

Permalink
Exclude rdf.py from coverage
Browse files Browse the repository at this point in the history
(so we don't need rdflib)
  • Loading branch information
mar10 committed Oct 29, 2024
1 parent 90e7517 commit e53478a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- mermaid: change mapper signatures and defaults
- tree.to_rdf() is now available for Tree (not only TypedTree).
- New method `node.up()` allows method chaining when adding nodes.
- Passes more pyright 'basic' checks.
- Passes pyright 'typeCheckingMode = "standard"'

## 0.9.0 (2024-09-12)

Expand Down
1 change: 1 addition & 0 deletions nutree/rdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
Functions and declarations to implement `rdflib <https://github.com/RDFLib/rdflib>`_.
"""
# pragma: exclude-file-from-coverage

# pyright: reportOptionalCall=false
# pyright: reportInvalidTypeForm=false
Expand Down
13 changes: 9 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,8 @@ ignore = [

[tool.pyright]
typeCheckingMode = "standard"
# typeCheckingMode = "off"
reportMissingImports = "none"
# include = ["nutree"]
include = ["nutree", "tests"]
# exclude = ["**/nutree/rdf.py"]

# https://github.com/microsoft/pyright/blob/main/docs/configuration.md#sample-pyprojecttoml-file
reportUnnecessaryTypeIgnoreComment = true
Expand Down Expand Up @@ -69,7 +66,15 @@ exclude_lines = [
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]

exclude_also = [
# 1. Exclude an except clause of a specific form:
# "except ValueError:\\n\\s*assume\\(False\\)",
# 2. Comments to turn coverage on and off:
# "no cover: start(?s:.)*?no cover: stop",
# 3. A pragma comment that excludes an entire file:
# "\\A(?s:.*# pragma: exclude file.*)\\Z",
"\\A(?s:.*# pragma: exclude-file-from-coverage.*)\\Z",
]
[tool.coverage.html]
directory = "build/coverage"

0 comments on commit e53478a

Please sign in to comment.