mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-23 04:11:28 +08:00
Doc: Use proper name capitalization of tooling (Ruff, Black, Flake8) (#10913)
This commit is contained in:
@@ -61,7 +61,7 @@ def run_stubdefaulter(stub_dir: str) -> None:
|
||||
|
||||
|
||||
def run_black(stub_dir: str) -> None:
|
||||
print(f"Running black: black {stub_dir}")
|
||||
print(f"Running Black: black {stub_dir}")
|
||||
subprocess.run(["black", stub_dir])
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ def run_isort(stub_dir: str) -> None:
|
||||
|
||||
|
||||
def run_ruff(stub_dir: str) -> None:
|
||||
print(f"Running ruff: ruff {stub_dir}")
|
||||
print(f"Running Ruff: ruff {stub_dir}")
|
||||
subprocess.run([sys.executable, "-m", "ruff", stub_dir])
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ def add_pyright_exclusion(stub_dir: str) -> None:
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(
|
||||
description="""Generate baseline stubs automatically for an installed pip package
|
||||
using stubgen. Also run black, isort and ruff. If the name of
|
||||
using stubgen. Also run Black, isort and Ruff. If the name of
|
||||
the project is different from the runtime Python package name, you may
|
||||
need to use --package (example: --package yaml PyYAML)."""
|
||||
)
|
||||
|
||||
@@ -45,7 +45,7 @@ PYTHON_PROTOBUF_DIR="protobuf-$PYTHON_PROTOBUF_VERSION"
|
||||
VENV=venv
|
||||
python3 -m venv "$VENV"
|
||||
source "$VENV/bin/activate"
|
||||
pip install -r "$REPO_ROOT/requirements-tests.txt" # for black and isort
|
||||
pip install -r "$REPO_ROOT/requirements-tests.txt" # for Black and isort
|
||||
|
||||
# Install mypy-protobuf
|
||||
pip install "git+https://github.com/dropbox/mypy-protobuf@$MYPY_PROTOBUF_VERSION"
|
||||
|
||||
@@ -82,7 +82,7 @@ def main() -> None:
|
||||
pytype_result: subprocess.CompletedProcess[bytes] | None = None
|
||||
|
||||
# Run formatters first. Order matters.
|
||||
print("\nRunning ruff...")
|
||||
print("\nRunning Ruff...")
|
||||
subprocess.run([sys.executable, "-m", "ruff", path])
|
||||
print("\nRunning isort...")
|
||||
subprocess.run([sys.executable, "-m", "isort", path])
|
||||
|
||||
Reference in New Issue
Block a user