diff --git a/Pipfile b/Pipfile index 23b1370..3fbc6e4 100644 --- a/Pipfile +++ b/Pipfile @@ -14,6 +14,7 @@ pyyaml = "~=5.4.1" [dev-packages] flake8 = "~=3.9.2" +yapf = "~=0.31.0" [requires] python_version = "3.8" diff --git a/README.md b/README.md index 7a38e97..f902575 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/ki/module.py b/ki/module.py index da8bc46..79eeb96 100644 --- a/ki/module.py +++ b/ki/module.py @@ -1 +1 @@ -from ki import models, commands, routes # noqa +from ki import models, commands, routes # noqa diff --git a/ki/test/test_skills_endpoint.py b/ki/test/test_skills_endpoint.py index 0603102..80cfae6 100644 --- a/ki/test/test_skills_endpoint.py +++ b/ki/test/test_skills_endpoint.py @@ -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":