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
|
- name: black
|
||||||
run: |
|
run: |
|
||||||
cd daemon
|
cd daemon
|
||||||
poetry run black --check --exclude ".+_pb2.*.py|doc|build" .
|
poetry run black --check .
|
||||||
- name: flake8
|
- name: flake8
|
||||||
run: |
|
run: |
|
||||||
cd daemon
|
cd daemon
|
||||||
|
|
|
@ -12,7 +12,7 @@ repos:
|
||||||
name: black
|
name: black
|
||||||
stages: [commit]
|
stages: [commit]
|
||||||
language: system
|
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]
|
types: [python]
|
||||||
|
|
||||||
- id: flake8
|
- id: flake8
|
||||||
|
|
|
@ -78,7 +78,7 @@ class DockerNode(CoreNode):
|
||||||
name: str = None,
|
name: str = None,
|
||||||
nodedir: str = None,
|
nodedir: str = None,
|
||||||
server: DistributedServer = None,
|
server: DistributedServer = None,
|
||||||
image: str = None
|
image: str = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
Create a DockerNode instance.
|
Create a DockerNode instance.
|
||||||
|
@ -209,9 +209,7 @@ class DockerNode(CoreNode):
|
||||||
if self.server is not None:
|
if self.server is not None:
|
||||||
self.host_cmd(f"rm -f {temp.name}")
|
self.host_cmd(f"rm -f {temp.name}")
|
||||||
os.unlink(temp.name)
|
os.unlink(temp.name)
|
||||||
logging.debug(
|
logging.debug("node(%s) added file: %s; mode: 0%o", self.name, filename, mode)
|
||||||
"node(%s) added file: %s; mode: 0%o", self.name, filename, mode
|
|
||||||
)
|
|
||||||
|
|
||||||
def nodefilecopy(self, filename: str, srcfilename: str, mode: int = None) -> None:
|
def nodefilecopy(self, filename: str, srcfilename: str, mode: int = None) -> None:
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -39,6 +39,11 @@ force_grid_wrap = 0
|
||||||
use_parentheses = "True"
|
use_parentheses = "True"
|
||||||
line_length = 88
|
line_length = 88
|
||||||
|
|
||||||
|
[tool.black]
|
||||||
|
line_length = 88
|
||||||
|
exclude = ".+_pb2.*.py|doc/|build/|__pycache__/"
|
||||||
|
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry>=0.12"]
|
requires = ["poetry>=0.12"]
|
||||||
build-backend = "poetry.masonry.api"
|
build-backend = "poetry.masonry.api"
|
||||||
|
|
Loading…
Reference in a new issue