Skip to content

Commit

Permalink
Check self format for the whole repo (#3750)
Browse files Browse the repository at this point in the history
`black .` is changing things in gallery and scripts for me
  • Loading branch information
hauntsaninja committed Jun 25, 2023
1 parent 93989e9 commit e103611
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Expand Up @@ -103,4 +103,4 @@ jobs:
python -m pip install -e ".[uvloop]"
- name: Format ourselves
run: python -m black --check src/
run: python -m black --check .
6 changes: 2 additions & 4 deletions gallery/gallery.py
Expand Up @@ -243,11 +243,9 @@ def format_repos(repos: Tuple[Path, ...], options: Namespace) -> None:


def main() -> None:
parser = ArgumentParser(
description="""Black Gallery is a script that
parser = ArgumentParser(description="""Black Gallery is a script that
automates the process of applying different Black versions to a selected
PyPI package and seeing the results between versions."""
)
PyPI package and seeing the results between versions.""")

group = parser.add_mutually_exclusive_group(required=True)
group.add_argument("-p", "--pypi-package", help="PyPI package to download.")
Expand Down
6 changes: 2 additions & 4 deletions scripts/make_width_table.py
Expand Up @@ -49,8 +49,7 @@ def make_width_table() -> Iterable[Tuple[int, int, int]]:
def main() -> None:
table_path = join(dirname(__file__), "..", "src", "black", "_width_table.py")
with open(table_path, "w") as f:
f.write(
f"""# Generated by {basename(__file__)}
f.write(f"""# Generated by {basename(__file__)}
# wcwidth {wcwidth.__version__}
# Unicode {wcwidth.list_versions()[-1]}
import sys
Expand All @@ -62,8 +61,7 @@ def main() -> None:
from typing import Final
WIDTH_TABLE: Final[List[Tuple[int, int, int]]] = [
"""
)
""")
for triple in make_width_table():
f.write(f" {triple!r},\n")
f.write("]\n")
Expand Down

0 comments on commit e103611

Please sign in to comment.