diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbb32aa3e9..e98ac6b473 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,6 +88,7 @@ jobs: cd src/cli pip install -r requirements-lint.txt flake8 . + black ./__app__/ ./tests --check isort --profile black ./onefuzz ./examples/ ./tests/ --check mypy . --ignore-missing-imports pytest -v tests @@ -166,6 +167,7 @@ jobs: pip install -r requirements-dev.txt pytest flake8 . + black ./__app__/ ./tests --check isort --profile black ./__app__/ ./tests --check mypy __app__ diff --git a/src/api-service/__app__/agent_can_schedule/__init__.py b/src/api-service/__app__/agent_can_schedule/__init__.py index 3f730bd698..e20fc3c674 100644 --- a/src/api-service/__app__/agent_can_schedule/__init__.py +++ b/src/api-service/__app__/agent_can_schedule/__init__.py @@ -39,7 +39,8 @@ def post(req: func.HttpRequest) -> func.HttpResponse: ) allowed = False stop_message = NodeMessage( - agent_id=node.machine_id, message=NodeCommand(stop=StopNodeCommand()), + agent_id=node.machine_id, + message=NodeCommand(stop=StopNodeCommand()), ) stop_message.save() diff --git a/src/api-service/requirements-dev.txt b/src/api-service/requirements-dev.txt index 73795ff63e..00794cd8bb 100644 --- a/src/api-service/requirements-dev.txt +++ b/src/api-service/requirements-dev.txt @@ -3,4 +3,5 @@ pytest flake8 mypy isort -vulture \ No newline at end of file +vulture +black diff --git a/src/ci/onefuzztypes.sh b/src/ci/onefuzztypes.sh index 6e13136eb5..06009cc4ab 100755 --- a/src/ci/onefuzztypes.sh +++ b/src/ci/onefuzztypes.sh @@ -12,6 +12,7 @@ pip install -r requirements-dev.txt python setup.py sdist bdist_wheel pip install -r requirements-lint.txt +black ./onefuzztypes --check flake8 ./onefuzztypes isort --profile black ./onefuzztypes --check mypy ./onefuzztypes --ignore-missing-imports diff --git a/src/cli/onefuzz/status/cache.py b/src/cli/onefuzz/status/cache.py index 5e694c2ffc..e4baaf70d1 100644 --- a/src/cli/onefuzz/status/cache.py +++ b/src/cli/onefuzz/status/cache.py @@ -197,7 +197,7 @@ def render_pools(self) -> List: pool.name, pool.os, pool.state, - nodes, + nodes or "None", ] results.append(entry) return results diff --git a/src/cli/requirements-lint.txt b/src/cli/requirements-lint.txt index 08109915e1..27a97b8b59 100644 --- a/src/cli/requirements-lint.txt +++ b/src/cli/requirements-lint.txt @@ -2,4 +2,5 @@ flake8 mypy pytest isort -vulture \ No newline at end of file +vulture +black diff --git a/src/pytypes/onefuzztypes/models.py b/src/pytypes/onefuzztypes/models.py index 87d705f4b8..87355f468b 100644 --- a/src/pytypes/onefuzztypes/models.py +++ b/src/pytypes/onefuzztypes/models.py @@ -42,10 +42,10 @@ def exactly_one(cls: Any, values: Any) -> Any: some.append(field) if not some: - raise ValueError('no variant set for enum') + raise ValueError("no variant set for enum") if len(some) > 1: - raise ValueError('multiple values set for enum: %s' % some) + raise ValueError("multiple values set for enum: %s" % some) return values diff --git a/src/pytypes/requirements-lint.txt b/src/pytypes/requirements-lint.txt index 11404bee76..4568b5e405 100644 --- a/src/pytypes/requirements-lint.txt +++ b/src/pytypes/requirements-lint.txt @@ -4,3 +4,4 @@ pytest isort pydantic vulture +black