Browse Source

pipeline: run mypy

Fabian Peter Hammerle 2 weeks ago
parent
commit
289980b1a6
5 changed files with 26 additions and 1 deletions
  1. 1 0
      .github/workflows/python.yml
  2. 1 0
      .gitignore
  3. 1 0
      Pipfile
  4. 21 1
      Pipfile.lock
  5. 2 0
      mypy.ini

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

@@ -49,6 +49,7 @@ jobs:
         PYTHON_VERSION: ${{ matrix.python-version }}
     - run: pipenv graph
     - run: pipenv run pytest --cov=acpi_backlight --cov-report=term-missing --cov-fail-under=64
+    - run: pipenv run mypy acpi_backlight tests
     # >=1.9.0 to detect branch name
     # https://github.com/coveralls-clients/coveralls-python/pull/207
     # https://github.com/coverallsapp/github-action/issues/4#issuecomment-547036866

+ 1 - 0
.gitignore

@@ -1,4 +1,5 @@
 /.coverage
 /.eggs/
+/.mypy_cache/
 /build/
 /dist/

+ 1 - 0
Pipfile

@@ -10,6 +10,7 @@ acpi-backlight = {editable = true, path = "."}
 # black requires python>=3.6
 # https://github.com/psf/black/commit/e74117f172e29e8a980e2c9de929ad50d3769150#diff-2eeaed663bd0d25b7e608891384b7298R51
 black = {version = "==20.8b1", markers = "python_version >= '3.6'"}
+mypy = "*"
 pytest = "*"
 pytest-cov = "*"
 

+ 21 - 1
Pipfile.lock

@@ -1,7 +1,7 @@
 {
     "_meta": {
         "hash": {
-            "sha256": "3d33bb86a4a178dade8ff0d2885a2b7eaded8ccaf8fbc26be002cad46e0bc6b0"
+            "sha256": "6a8848331caf2e96c42a7f12649018df4347fb022a536382ccaf48a6904d21b7"
         },
         "pipfile-spec": 6,
         "requires": {
@@ -106,6 +106,26 @@
             ],
             "version": "==1.0.1"
         },
+        "mypy": {
+            "hashes": [
+                "sha256:2c6cde8aa3426c1682d35190b59b71f661237d74b053822ea3d748e2c9578a7c",
+                "sha256:3fdda71c067d3ddfb21da4b80e2686b71e9e5c72cca65fa216d207a358827f86",
+                "sha256:5dd13ff1f2a97f94540fd37a49e5d255950ebcdf446fb597463a40d0df3fac8b",
+                "sha256:6731603dfe0ce4352c555c6284c6db0dc935b685e9ce2e4cf220abe1e14386fd",
+                "sha256:6bb93479caa6619d21d6e7160c552c1193f6952f0668cdda2f851156e85186fc",
+                "sha256:81c7908b94239c4010e16642c9102bfc958ab14e36048fa77d0be3289dda76ea",
+                "sha256:9c7a9a7ceb2871ba4bac1cf7217a7dd9ccd44c27c2950edbc6dc08530f32ad4e",
+                "sha256:a4a2cbcfc4cbf45cd126f531dedda8485671545b43107ded25ce952aac6fb308",
+                "sha256:b7fbfabdbcc78c4f6fc4712544b9b0d6bf171069c6e0e3cb82440dd10ced3406",
+                "sha256:c05b9e4fb1d8a41d41dec8786c94f3b95d3c5f528298d769eb8e73d293abc48d",
+                "sha256:d7df6eddb6054d21ca4d3c6249cae5578cb4602951fd2b6ee2f5510ffb098707",
+                "sha256:e0b61738ab504e656d1fe4ff0c0601387a5489ca122d55390ade31f9ca0e252d",
+                "sha256:eff7d4a85e9eea55afa34888dfeaccde99e7520b51f867ac28a48492c0b1130c",
+                "sha256:f05644db6779387ccdb468cc47a44b4356fc2ffa9287135d05b70a98dc83b89a"
+            ],
+            "index": "pypi",
+            "version": "==0.782"
+        },
         "mypy-extensions": {
             "hashes": [
                 "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d",

+ 2 - 0
mypy.ini

@@ -0,0 +1,2 @@
+[mypy]
+ignore_missing_imports = True