Skip to content

Commit

Permalink
fix typos, ignore import errors in coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
cleder committed Jan 4, 2024
1 parent 6bff022 commit ac2acb1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion fastkml/styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def __repr__(self) -> str:
")"
)

def ___bool__(self) -> bool:
def __bool__(self) -> bool:
return bool(self.icon)


Expand Down Expand Up @@ -811,6 +811,9 @@ def __repr__(self) -> str:
")"
)

def __bool__(self) -> bool:
return bool(self.styles)

def append_style(
self,
style: AnyStyle,
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ source = [
[tool.coverage.report]
exclude_also = [
"^\\s*\\.\\.\\.$",
"except ImportError:",
"if TYPE_CHECKING:",
]

Expand Down
4 changes: 2 additions & 2 deletions tests/registry_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def set_element(
"""Get an attribute from an XML object."""


def get_kwarg(
def get_kwarg( # type: ignore[empty-body]
*,
element: Element,
ns: str,
Expand All @@ -81,7 +81,7 @@ def get_kwarg(
strict: bool,
) -> Dict[str, Any]:
"""Get the kwarg for the constructor from the element."""
return {kwarg: None}
...


def test_registry_get_root() -> None:
Expand Down

0 comments on commit ac2acb1

Please sign in to comment.