From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Sun, 25 Jun 2023 13:53:26 +0000 (-0700) Subject: Check self format for the whole repo (#3750) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/e1036119f264a846bb049fad8404df318bc2f455 Check self format for the whole repo (#3750) `black .` is changing things in gallery and scripts for me --- diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3ca2a46..608c58a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 . diff --git a/gallery/gallery.py b/gallery/gallery.py index 38e52e3..ba5d6f6 100755 --- a/gallery/gallery.py +++ b/gallery/gallery.py @@ -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.") diff --git a/scripts/make_width_table.py b/scripts/make_width_table.py index 09aca9c..89c2025 100644 --- a/scripts/make_width_table.py +++ b/scripts/make_width_table.py @@ -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 @@ -62,8 +61,7 @@ else: 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")