Skip to content

Commit ba72e85

Browse files
committed
Ignore "unreachable" false-positives from mypy
cf. <python/mypy#11969>
1 parent 23bcccc commit ba72e85

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test_state.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_migration(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:
5757
)
5858
assert statefile.path == tmp_path / STATE_FILE
5959
assert not statefile.migrating
60-
assert statefile.modified
60+
assert statefile.modified # type: ignore[unreachable]
6161
with open(STATE_FILE) as fp:
6262
data = json.load(fp)
6363
assert data == {
@@ -85,7 +85,7 @@ def test_defaulting(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:
8585
assert os.listdir() == [STATE_FILE]
8686
assert statefile.state == State(github=newdt, travis=None, appveyor=None)
8787
assert statefile.modified
88-
with open(STATE_FILE) as fp:
88+
with open(STATE_FILE) as fp: # type: ignore[unreachable]
8989
data = json.load(fp)
9090
assert data == {
9191
"github": "2021-06-11T14:55:01+00:00",
@@ -124,7 +124,7 @@ def test_empty(contents: str, monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -
124124
assert os.listdir() == [STATE_FILE]
125125
assert statefile.state == State(github=newdt, travis=None, appveyor=None)
126126
assert statefile.modified
127-
with f.open() as fp:
127+
with f.open() as fp: # type: ignore[unreachable]
128128
data = json.load(fp)
129129
assert data == {
130130
"github": "2021-06-11T14:55:01+00:00",
@@ -161,7 +161,7 @@ def test_populated_explicit_path(tmp_path: Path) -> None:
161161
assert statefile.path == f
162162
assert not statefile.migrating
163163
assert statefile.modified
164-
with f.open() as fp:
164+
with f.open() as fp: # type: ignore[unreachable]
165165
data = json.load(fp)
166166
assert data == {
167167
"github": "2021-06-11T15:11:50+00:00",

0 commit comments

Comments
 (0)