Convert formatting to use ruff instead of yapf + isort (#26247)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -94,11 +94,15 @@ def group_files(changed_files: list[str]) -> dict[str, list[str]]:
|
||||
return file_groups
|
||||
|
||||
|
||||
def mypy(targets: list[str], python_version: Optional[str],
|
||||
follow_imports: Optional[str], file_group: str) -> int:
|
||||
def mypy(
|
||||
targets: list[str],
|
||||
python_version: Optional[str],
|
||||
follow_imports: Optional[str],
|
||||
file_group: str,
|
||||
) -> int:
|
||||
"""
|
||||
Run mypy on the given targets.
|
||||
|
||||
|
||||
Args:
|
||||
targets: List of files or directories to check.
|
||||
python_version: Python version to use (e.g., "3.10") or None to use
|
||||
@@ -131,8 +135,9 @@ def main():
|
||||
for file_group, changed_files in file_groups.items():
|
||||
follow_imports = None if ci and file_group == "" else "skip"
|
||||
if changed_files:
|
||||
returncode |= mypy(changed_files, python_version, follow_imports,
|
||||
file_group)
|
||||
returncode |= mypy(
|
||||
changed_files, python_version, follow_imports, file_group
|
||||
)
|
||||
return returncode
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user