SCons: Integrate annotations where relevant

• Expand Ruff linter to catch & upgrade legacy type-hint syntax
This commit is contained in:
Thaddeus Crews 2024-11-24 10:14:16 -06:00
parent 235a32ad11
commit 11fc998368
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
9 changed files with 116 additions and 104 deletions

View file

@ -1,8 +1,9 @@
#!/usr/bin/env python
from __future__ import annotations
from misc.utility.scons_hints import *
import pathlib
from typing import Tuple
import profiling_builders
@ -11,7 +12,7 @@ Import("env")
env.add_source_files(env.core_sources, "*.cpp")
def get_profiler_and_path_from_path(path: pathlib.Path) -> Tuple[str, pathlib.Path]:
def get_profiler_and_path_from_path(path: pathlib.Path) -> tuple[str, pathlib.Path]:
if not path.is_dir():
print("profiler_path must be empty or point to a directory.")
Exit(255)