Browse Source

pipenv: added autopep8 to dev deps

Fabian Peter Hammerle 5 years ago
parent
commit
24189db123
4 changed files with 18 additions and 3 deletions
  1. 1 0
      Pipfile
  2. 15 1
      Pipfile.lock
  3. 1 1
      freesurfer_surface/__init__.py
  4. 1 1
      tests/test_annotation.py

+ 1 - 0
Pipfile

@@ -10,6 +10,7 @@ freesurfer-surface = {editable = true, path = "."}
 pylint = ">=2.3.0,<3"
 pytest = "<5"
 pytest-cov = "<3,>=2"
+"autopep8" = "<2"
 
 [requires]
 python_version = "3"

+ 15 - 1
Pipfile.lock

@@ -1,7 +1,7 @@
 {
     "_meta": {
         "hash": {
-            "sha256": "89cb6a7b074d4cd601cb477ebfc3f70743642b99a90279bfbf6562bc1e0b434c"
+            "sha256": "8352fc62d16e328f3af33b4fb405bf12384ddb936c3ebbc33197245d69c80c72"
         },
         "pipfile-spec": 6,
         "requires": {
@@ -43,6 +43,13 @@
             ],
             "version": "==19.1.0"
         },
+        "autopep8": {
+            "hashes": [
+                "sha256:4d8eec30cc81bc5617dbf1218201d770dc35629363547f17577c61683ccfb3ee"
+            ],
+            "index": "pypi",
+            "version": "==1.4.4"
+        },
         "coverage": {
             "hashes": [
                 "sha256:3684fabf6b87a369017756b551cef29e505cb155ddb892a7a29277b978da88b9",
@@ -138,6 +145,13 @@
             ],
             "version": "==1.8.0"
         },
+        "pycodestyle": {
+            "hashes": [
+                "sha256:95a2219d12372f05704562a14ec30bc76b05a5b297b21a5dfe3f6fac3491ae56",
+                "sha256:e40a936c9a450ad81df37f549d676d127b1b66000a6c500caa2b085bc0ca976c"
+            ],
+            "version": "==2.5.0"
+        },
         "pylint": {
             "hashes": [
                 "sha256:5d77031694a5fb97ea95e828c8d10fc770a1df6eb3906067aaed42201a8a6a09",

+ 1 - 1
freesurfer_surface/__init__.py

@@ -76,7 +76,7 @@ class Label:
 
     @property
     def color_code(self) -> int:
-        if self.index == 0: # unknown
+        if self.index == 0:  # unknown
             return 0
         return int.from_bytes((self.red, self.green, self.blue, self.transparency),
                               byteorder='little', signed=False)

+ 1 - 1
tests/test_annotation.py

@@ -23,7 +23,7 @@ def test_load_annotation():
     assert vars(annotation.labels[0]) == {'index': 0, 'name': 'unknown',
                                           'red': 25, 'green': 5, 'blue': 25, 'transparency': 0}
     assert vars(annotation.labels[28]) == {'index': 28, 'name': 'superiorfrontal',
-                                          'red': 20, 'green': 220, 'blue': 160, 'transparency': 0}
+                                           'red': 20, 'green': 220, 'blue': 160, 'transparency': 0}
     precentral, = filter(lambda l: l.name == 'precentral', annotation.labels.values())
     postcentral, = filter(lambda l: l.name == 'postcentral', annotation.labels.values())
     assert vars(precentral) == {'index': 24, 'name': 'precentral',