fix: resolve pylint and pyright linting issues
- Remove .keys() iteration in favor of direct dictionary iteration - Remove redundant os module reimport in tui.py - Disable unnecessary-ellipsis rule in pylintrc to avoid conflict with pyright's Protocol type requirements pyright: 0 errors pylint: 9.93/10 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -246,7 +246,7 @@ class GitUser:
|
||||
@classmethod
|
||||
def from_dict(cls, bottle_name: str, raw: object) -> "GitUser":
|
||||
d = as_json_object(raw, f"bottle '{bottle_name}' git-gate.user")
|
||||
for k in d.keys():
|
||||
for k in d:
|
||||
if k not in {"name", "email"}:
|
||||
raise ManifestError(
|
||||
f"bottle '{bottle_name}' git-gate.user has unknown key {k!r}; "
|
||||
@@ -281,7 +281,7 @@ def parse_git_gate_config(
|
||||
raw: object,
|
||||
) -> tuple[tuple[GitEntry, ...], GitUser]:
|
||||
d = as_json_object(raw, f"bottle '{bottle_name}' git-gate")
|
||||
for k in d.keys():
|
||||
for k in d:
|
||||
if k not in {"user", "repos"}:
|
||||
raise ManifestError(
|
||||
f"bottle '{bottle_name}' git-gate has unknown key {k!r}; "
|
||||
|
||||
Reference in New Issue
Block a user