Skip to content

Partial clean up wrt mypy and black #1617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Ignore remaining [unreachable] type errors
  • Loading branch information
bodograumann committed Jul 20, 2023
commit 76394d42ce2a33b4db71fd64763c1e9dae136747
2 changes: 1 addition & 1 deletion git/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def refresh(path: Optional[PathLike] = None) -> None:
if not Git.refresh(path=path):
return
if not FetchInfo.refresh():
return
return # type: ignore [unreachable]

GIT_OK = True

Expand Down
4 changes: 2 additions & 2 deletions git/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ def get_config_path(config_level: Lit_config_levels) -> str:
raise ValueError("No repo to get repository configuration from. Use Repo._get_config_path")
else:
# Should not reach here. Will raise ValueError if does. Static typing will warn missing elifs
assert_never(
config_level, # type: ignore[unreachable]
assert_never( # type: ignore[unreachable]
config_level,
ValueError(f"Invalid configuration level: {config_level!r}"),
)

Expand Down
4 changes: 2 additions & 2 deletions git/repo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,8 @@ def _get_config_path(self, config_level: Lit_config_levels, git_dir: Optional[Pa
return osp.normpath(osp.join(repo_dir, "config"))
else:

assert_never(
config_level, # type:ignore[unreachable]
assert_never( # type:ignore[unreachable]
config_level,
ValueError(f"Invalid configuration level: {config_level!r}"),
)

Expand Down