From 1b298c0dbb90f979329b4b57d46f5cf96648b9fe Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 28 Mar 2022 22:24:08 +0300 Subject: [PATCH] Update and unpin black It's stable now, so there shouldn't be too many changes --- .github/workflows/python-lint.yml | 1 - .pre-commit-config.yaml | 13 +++++-------- dev-requirements.txt | 2 +- pyproject.toml | 1 - 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/python-lint.yml b/.github/workflows/python-lint.yml index 9847632..05a8bd2 100644 --- a/.github/workflows/python-lint.yml +++ b/.github/workflows/python-lint.yml @@ -16,7 +16,6 @@ jobs: - uses: psf/black@stable with: src: "./maubot" - version: "22.1.0" - name: pre-commit run: | pip install pre-commit diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 43dc887..e1e07d5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,17 +7,14 @@ repos: - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files - # TODO convert to use the upstream psf/black when - # https://github.com/psf/black/issues/2493 gets fixed - - repo: local + - repo: https://github.com/psf/black + rev: 22.3.0 hooks: - id: black - name: black - entry: black --check - language: system - files: ^maubot/.*\.py$ + language_version: python3 + files: ^maubot/.*\.pyi?$ - repo: https://github.com/PyCQA/isort rev: 5.10.1 hooks: - id: isort - files: ^maubot/.*$ + files: ^maubot/.*\.pyi$ diff --git a/dev-requirements.txt b/dev-requirements.txt index 232f724..16231f3 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,3 +1,3 @@ pre-commit>=2.10.1,<3 isort>=5.10.1,<6 -black==22.1.0 +black>=22.3.0,<22 diff --git a/pyproject.toml b/pyproject.toml index 1273555..4cee457 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,5 +10,4 @@ skip = ["maubot/management/frontend"] [tool.black] line-length = 99 target-version = ["py38"] -required-version = "22.1.0" force-exclude = "maubot/management/frontend"