Skip to content

Commit

Permalink
ansible-test - Simplify type hints.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattclay committed Mar 4, 2022
1 parent ea66cf1 commit af2b136
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 31 deletions.
Expand Up @@ -18,14 +18,13 @@
CoverageAnalyzeConfig,
)

if t.TYPE_CHECKING:
TargetKey = t.TypeVar('TargetKey', int, t.Tuple[int, int])
NamedPoints = t.Dict[str, t.Dict[TargetKey, t.Set[str]]]
IndexedPoints = t.Dict[str, t.Dict[TargetKey, t.Set[int]]]
Arcs = t.Dict[str, t.Dict[t.Tuple[int, int], t.Set[int]]]
Lines = t.Dict[str, t.Dict[int, t.Set[int]]]
TargetIndexes = t.Dict[str, int]
TargetSetIndexes = t.Dict[t.FrozenSet[int], int]
TargetKey = t.TypeVar('TargetKey', int, t.Tuple[int, int])
NamedPoints = t.Dict[str, t.Dict[TargetKey, t.Set[str]]]
IndexedPoints = t.Dict[str, t.Dict[TargetKey, t.Set[int]]]
Arcs = t.Dict[str, t.Dict[t.Tuple[int, int], t.Set[int]]]
Lines = t.Dict[str, t.Dict[int, t.Set[int]]]
TargetIndexes = t.Dict[str, int]
TargetSetIndexes = t.Dict[t.FrozenSet[int], int]


class CoverageAnalyzeTargetsConfig(CoverageAnalyzeConfig):
Expand Down
Expand Up @@ -18,13 +18,12 @@
write_report,
)

if t.TYPE_CHECKING:
from . import (
Arcs,
IndexedPoints,
Lines,
TargetIndexes,
)
from . import (
Arcs,
IndexedPoints,
Lines,
TargetIndexes,
)


class CoverageAnalyzeTargetsCombineConfig(CoverageAnalyzeTargetsConfig):
Expand Down
Expand Up @@ -21,11 +21,10 @@
write_report,
)

if t.TYPE_CHECKING:
from . import (
NamedPoints,
TargetIndexes,
)
from . import (
NamedPoints,
TargetIndexes,
)


class CoverageAnalyzeTargetsFilterConfig(CoverageAnalyzeTargetsConfig):
Expand Down
Expand Up @@ -43,12 +43,11 @@
write_report,
)

if t.TYPE_CHECKING:
from . import (
Arcs,
Lines,
TargetIndexes,
)
from . import (
Arcs,
Lines,
TargetIndexes,
)


class CoverageAnalyzeTargetsGenerateConfig(CoverageAnalyzeTargetsConfig):
Expand Down
Expand Up @@ -24,11 +24,10 @@
write_report,
)

if t.TYPE_CHECKING:
from . import (
TargetIndexes,
IndexedPoints,
)
from . import (
TargetIndexes,
IndexedPoints,
)


class CoverageAnalyzeTargetsMissingConfig(CoverageAnalyzeTargetsConfig):
Expand Down

0 comments on commit af2b136

Please sign in to comment.