[Lint]Style: Convert root, benchmarks, tools and docs to ruff format (#5843)
### What this PR does / why we need it?
Description
This PR fixes linting issues in the root directory, benchmarks/, tools/
and docs/ to align with the project's Ruff configuration.
This is part of a gradual effort to enable full linting coverage across
the repository. The corresponding paths have been removed from the
exclude list in pyproject.toml.
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
- vLLM version: v0.13.0
- vLLM main:
2f4e6548ef
---------
Signed-off-by: root <root@LAPTOP-VQKDDVMG.localdomain>
Co-authored-by: root <root@LAPTOP-VQKDDVMG.localdomain>
This commit is contained in:
@@ -36,8 +36,8 @@ def check_init_file_in_package(directory):
|
||||
return False
|
||||
|
||||
# If any .py file exists, we expect an __init__.py
|
||||
if any(f.endswith('.py') for f in files):
|
||||
init_file = os.path.join(directory, '__init__.py')
|
||||
if any(f.endswith(".py") for f in files):
|
||||
init_file = os.path.join(directory, "__init__.py")
|
||||
if not os.path.isfile(init_file):
|
||||
return False
|
||||
return True
|
||||
@@ -62,9 +62,7 @@ def main():
|
||||
all_missing.update(missing)
|
||||
|
||||
if all_missing:
|
||||
print(
|
||||
"❌ Missing '__init__.py' files in the following Python package directories:"
|
||||
)
|
||||
print("❌ Missing '__init__.py' files in the following Python package directories:")
|
||||
for pkg in sorted(all_missing):
|
||||
print(f" - {pkg}")
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user