Skip to content

Commit

Permalink
Skip coverage for if TYPE_CHECKING blocks (#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
Qalthos authored Jul 31, 2024
1 parent 5a0fcf6 commit 9bbb0f0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ansible_compat/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from ansible_compat.errors import InvalidPrerequisiteError, MissingAnsibleError
from ansible_compat.ports import cache

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from pathlib import Path


Expand Down
2 changes: 1 addition & 1 deletion src/ansible_compat/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from ansible_compat.constants import ANSIBLE_MISSING_RC, INVALID_PREREQUISITES_RC

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from subprocess import CompletedProcess


Expand Down
2 changes: 1 addition & 1 deletion src/ansible_compat/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from ansible_compat.errors import InvalidPrerequisiteError

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from pathlib import Path


Expand Down
2 changes: 1 addition & 1 deletion src/ansible_compat/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from ansible_compat.loaders import colpath_from_path, yaml_from_file
from ansible_compat.prerun import get_cache_dir

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
# https://github.com/PyCQA/pylint/issues/3240
# pylint: disable=unsubscriptable-object
CompletedProcess = subprocess.CompletedProcess[Any]
Expand Down
2 changes: 1 addition & 1 deletion src/ansible_compat/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import jsonschema
from jsonschema.validators import validator_for

if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from ansible_compat.types import JSON


Expand Down

0 comments on commit 9bbb0f0

Please sign in to comment.