Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

re-add black to lint stages #45

Merged
merged 4 commits into from
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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__

Expand Down
3 changes: 2 additions & 1 deletion src/api-service/__app__/agent_can_schedule/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
3 changes: 2 additions & 1 deletion src/api-service/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ pytest
flake8
mypy
isort
vulture
vulture
black
1 change: 1 addition & 0 deletions src/ci/onefuzztypes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/cli/onefuzz/status/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def render_pools(self) -> List:
pool.name,
pool.os,
pool.state,
nodes,
nodes or "None",
]
results.append(entry)
return results
Expand Down
3 changes: 2 additions & 1 deletion src/cli/requirements-lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ flake8
mypy
pytest
isort
vulture
vulture
black
4 changes: 2 additions & 2 deletions src/pytypes/onefuzztypes/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/pytypes/requirements-lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ pytest
isort
pydantic
vulture
black