Skip to content

Commit 76394d4

Browse files
committed
Ignore remaining [unreachable] type errors
1 parent b55cf65 commit 76394d4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Diff for: git/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def refresh(path: Optional[PathLike] = None) -> None:
7676
if not Git.refresh(path=path):
7777
return
7878
if not FetchInfo.refresh():
79-
return
79+
return # type: ignore [unreachable]
8080

8181
GIT_OK = True
8282

Diff for: git/config.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ def get_config_path(config_level: Lit_config_levels) -> str:
265265
raise ValueError("No repo to get repository configuration from. Use Repo._get_config_path")
266266
else:
267267
# Should not reach here. Will raise ValueError if does. Static typing will warn missing elifs
268-
assert_never(
269-
config_level, # type: ignore[unreachable]
268+
assert_never( # type: ignore[unreachable]
269+
config_level,
270270
ValueError(f"Invalid configuration level: {config_level!r}"),
271271
)
272272

Diff for: git/repo/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,8 @@ def _get_config_path(self, config_level: Lit_config_levels, git_dir: Optional[Pa
549549
return osp.normpath(osp.join(repo_dir, "config"))
550550
else:
551551

552-
assert_never(
553-
config_level, # type:ignore[unreachable]
552+
assert_never( # type:ignore[unreachable]
553+
config_level,
554554
ValueError(f"Invalid configuration level: {config_level!r}"),
555555
)
556556

0 commit comments

Comments
 (0)