Pārlūkot izejas kodu

Update and unpin black

Tulir Asokan 3 gadi atpakaļ
vecāks
revīzija
614af99494

+ 1 - 1
.github/workflows/python-lint.yml

@@ -16,7 +16,7 @@ jobs:
     - uses: psf/black@stable
       with:
         src: "./mautrix_instagram ./mauigpapi"
-        version: "22.1.0"
+        version: "22.3.0"
     - name: pre-commit
       run: |
         pip install pre-commit

+ 5 - 8
.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: ^(mauigpapi|mautrix_instagram)/.*\.py$
+        language_version: python3
+        files: ^(mauigpapi|mautrix_instagram)/.*\.pyi?$
   - repo: https://github.com/PyCQA/isort
     rev: 5.10.1
     hooks:
       - id: isort
-        files: ^(mauigpapi|mautrix_instagram)/.*$
+        files: ^(mauigpapi|mautrix_instagram)/.*\.pyi?$

+ 1 - 1
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,<23

+ 0 - 1
pyproject.toml

@@ -9,4 +9,3 @@ line_length = 99
 [tool.black]
 line-length = 99
 target-version = ["py38"]
-required-version = "22.1.0"