mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 10:12:17 +02:00
ty does not enforce existence of type signatures on functions, so use ruff to do it
This commit is contained in:
@@ -16,12 +16,12 @@ cmdline = (
|
||||
)
|
||||
|
||||
|
||||
def clean(x):
|
||||
def clean(x: str) -> None:
|
||||
if os.path.exists(x):
|
||||
shutil.rmtree(x)
|
||||
|
||||
|
||||
def regenerate():
|
||||
def regenerate() -> None:
|
||||
clean('out')
|
||||
|
||||
subprocess.check_call(
|
||||
@@ -29,11 +29,11 @@ def regenerate():
|
||||
)
|
||||
|
||||
|
||||
def strip_trailing_whitespace(c):
|
||||
def strip_trailing_whitespace(c: str) -> str:
|
||||
return re.sub(r'\s+$', '', c, flags=re.MULTILINE) + '\n'
|
||||
|
||||
|
||||
def export():
|
||||
def export() -> None:
|
||||
with open('out/include/glad/gl.h', 'r', encoding='utf-8') as source:
|
||||
data = source.read()
|
||||
data = strip_trailing_whitespace(data)
|
||||
|
||||
Reference in New Issue
Block a user