moved python black configuration to pyproject.toml and fixed bad exclude
This commit is contained in:
parent
f8b0ab6ec3
commit
80194b3e38
4 changed files with 9 additions and 6 deletions
2
.github/workflows/daemon-checks.yml
vendored
2
.github/workflows/daemon-checks.yml
vendored
|
@ -26,7 +26,7 @@ jobs:
|
|||
- name: black
|
||||
run: |
|
||||
cd daemon
|
||||
poetry run black --check --exclude ".+_pb2.*.py|doc|build" .
|
||||
poetry run black --check .
|
||||
- name: flake8
|
||||
run: |
|
||||
cd daemon
|
||||
|
|
|
@ -12,7 +12,7 @@ repos:
|
|||
name: black
|
||||
stages: [commit]
|
||||
language: system
|
||||
entry: bash -c 'cd daemon && poetry run black --exclude ".+_pb2.*.py|doc|build" .'
|
||||
entry: bash -c 'cd daemon && poetry run black .'
|
||||
types: [python]
|
||||
|
||||
- id: flake8
|
||||
|
|
|
@ -78,7 +78,7 @@ class DockerNode(CoreNode):
|
|||
name: str = None,
|
||||
nodedir: str = None,
|
||||
server: DistributedServer = None,
|
||||
image: str = None
|
||||
image: str = None,
|
||||
) -> None:
|
||||
"""
|
||||
Create a DockerNode instance.
|
||||
|
@ -209,9 +209,7 @@ class DockerNode(CoreNode):
|
|||
if self.server is not None:
|
||||
self.host_cmd(f"rm -f {temp.name}")
|
||||
os.unlink(temp.name)
|
||||
logging.debug(
|
||||
"node(%s) added file: %s; mode: 0%o", self.name, filename, mode
|
||||
)
|
||||
logging.debug("node(%s) added file: %s; mode: 0%o", self.name, filename, mode)
|
||||
|
||||
def nodefilecopy(self, filename: str, srcfilename: str, mode: int = None) -> None:
|
||||
"""
|
||||
|
|
|
@ -39,6 +39,11 @@ force_grid_wrap = 0
|
|||
use_parentheses = "True"
|
||||
line_length = 88
|
||||
|
||||
[tool.black]
|
||||
line_length = 88
|
||||
exclude = ".+_pb2.*.py|doc/|build/|__pycache__/"
|
||||
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry>=0.12"]
|
||||
build-backend = "poetry.masonry.api"
|
||||
|
|
Loading…
Reference in a new issue