mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-09-05 09:18:33 +00:00
Ensforce Python formatting in CI
This commit is contained in:
parent
f8829f44b7
commit
bcf5ffe73f
2 changed files with 3 additions and 0 deletions
2
.github/workflows/ci.py
vendored
2
.github/workflows/ci.py
vendored
|
|
@ -348,6 +348,8 @@ def main() -> None:
|
|||
q = '\n'.join(filter(lambda x: not x.rstrip().endswith('_generated.go'), q.strip().splitlines())).strip()
|
||||
if q:
|
||||
raise SystemExit(q)
|
||||
if subprocess.run(['ruff', 'format', '--check']).returncode != 0:
|
||||
raise SystemExit('Some Python files are not formatted correctly')
|
||||
elif action == 'check-dependencies':
|
||||
check_dependencies()
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -1096,6 +1096,7 @@ def is_valid_slot(x: str) -> TypeGuard[Slot]:
|
|||
|
||||
VALID_VAR_TYPES: frozenset[str] = frozenset({'uint', 'int', 'float', 'double', 'bool'})
|
||||
|
||||
|
||||
@run_once
|
||||
def identifiers_pat() -> re.Pattern[str]:
|
||||
return re.compile(r'^[A-Za-z_][A-Za-z0-9_]*$')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue