ty does not enforce existence of type signatures on functions, so use ruff to do it

This commit is contained in:
Kovid Goyal
2026-07-07 13:56:54 +05:30
parent cc95fccc8d
commit 8860f1a0a7
8 changed files with 78 additions and 69 deletions

View File

@@ -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)