Merge pull request 'Add yapf to Pipenv environment' (#6) from add-yapf into main
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #6
This commit is contained in:
commit
ea7b6391c1
1
Pipfile
1
Pipfile
@ -14,6 +14,7 @@ pyyaml = "~=5.4.1"
|
||||
|
||||
[dev-packages]
|
||||
flake8 = "~=3.9.2"
|
||||
yapf = "~=0.31.0"
|
||||
|
||||
[requires]
|
||||
python_version = "3.8"
|
||||
|
@ -43,6 +43,13 @@ python -m unittest discover ki
|
||||
flake8
|
||||
```
|
||||
|
||||
### Formatierung
|
||||
|
||||
Um ein einheitliches Quellcode-Erlebnis zu haben, kann der Code mit yapf neu formatiert werden:
|
||||
|
||||
'''
|
||||
yapf -i --recursive ki/
|
||||
'''
|
||||
|
||||
### Testbenutzer
|
||||
|
||||
|
@ -1 +1 @@
|
||||
from ki import models, commands, routes # noqa
|
||||
from ki import models, commands, routes # noqa
|
||||
|
@ -22,13 +22,14 @@ class TestSkillsEndpoint(unittest.TestCase):
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(
|
||||
{
|
||||
"skills": [
|
||||
{"id": 1, "name": "PHP"},
|
||||
{"id": 3, "name": "Python"}
|
||||
]
|
||||
},
|
||||
response.json
|
||||
)
|
||||
"skills": [{
|
||||
"id": 1,
|
||||
"name": "PHP"
|
||||
}, {
|
||||
"id": 3,
|
||||
"name": "Python"
|
||||
}]
|
||||
}, response.json)
|
||||
|
||||
|
||||
if __name__ == "main":
|
||||
|
Loading…
Reference in New Issue
Block a user