Просмотр исходного кода

test pipeline: add pylint-import-requirements

Fabian Peter Hammerle 2 лет назад
Родитель
Сommit
6c680d5918
3 измененных файлов с 11 добавлено и 2 удалено
  1. 1 1
      .github/workflows/python.yml
  2. 1 0
      Pipfile
  3. 9 1
      Pipfile.lock

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

@@ -52,7 +52,7 @@ jobs:
         PYTHON_VERSION: ${{ matrix.python-version }}
     - run: pipenv graph
     - run: pipenv run pytest --cov="$(cat *.egg-info/top_level.txt)" --cov-report=term-missing --cov-fail-under=100
-    - run: pipenv run pylint "$(cat *.egg-info/top_level.txt)"
+    - run: pipenv run pylint --load-plugins=pylint_import_requirements "$(cat *.egg-info/top_level.txt)"
     # https://github.com/PyCQA/pylint/issues/352
     # disable parse-error due to:
     # > tests/resources/__init__.py:1:0: F0010: error while code parsing: Unable to load file tests/resources/__init__.py:

+ 1 - 0
Pipfile

@@ -10,6 +10,7 @@ pubmed-bibtex = {editable = true, path = "."}
 black = "==21.12b0"
 mypy = "*"
 pylint = "*"
+pylint-import-requirements = "*"
 pytest = "*"
 pytest-cov = "*"
 types-requests = "*"

+ 9 - 1
Pipfile.lock

@@ -1,7 +1,7 @@
 {
     "_meta": {
         "hash": {
-            "sha256": "f5c7075aa94a8c796667be00d4c6f0f00254d787603f09f96e30b9e3011e70c9"
+            "sha256": "60761d58ec18f2e3d811889084775b4871b3059f6a7c6c6c31d76b8d21e17ef7"
         },
         "pipfile-spec": 6,
         "requires": {
@@ -288,6 +288,14 @@
             "index": "pypi",
             "version": "==2.12.2"
         },
+        "pylint-import-requirements": {
+            "hashes": [
+                "sha256:39d0993baa0991c2c6258d310aacd5f69c850ba59cb3d2ae8aa69886886b7135",
+                "sha256:bc138263bf1f79d8d1bf3d3f6786248024a71b4202cd19a189f1346f3e5b20a7"
+            ],
+            "index": "pypi",
+            "version": "==2.0.5"
+        },
         "pyparsing": {
             "hashes": [
                 "sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea",