style: add a few more checks
This commit is contained in:
+24
-21
@@ -1,22 +1,25 @@
|
|||||||
repos:
|
repos:
|
||||||
- repo: https://gitlab.com/pycqa/flake8
|
- repo: https://gitlab.com/pycqa/flake8
|
||||||
rev: 3.8.3
|
rev: 3.8.3
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
pass_filenames: true
|
exclude: cibuildwheel/resources/
|
||||||
# this seems to need to be here in addition to setup.cfg
|
additional_dependencies: [flake8-bugbear]
|
||||||
exclude: cibuildwheel/resources/
|
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v3.2.0
|
rev: v3.2.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-yaml
|
- id: check-case-conflict
|
||||||
- id: check-merge-conflict
|
- id: check-merge-conflict
|
||||||
- id: end-of-file-fixer
|
- id: check-yaml
|
||||||
exclude: cibuildwheel/resources/pinned_docker_images.cfg
|
- id: end-of-file-fixer
|
||||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
exclude: cibuildwheel/resources/pinned_docker_images.cfg
|
||||||
rev: v0.782
|
- id: mixed-line-ending
|
||||||
hooks:
|
- id: trailing-whitespace
|
||||||
- id: mypy
|
|
||||||
files: cibuildwheel/|test/
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
entry: mypy
|
rev: v0.782
|
||||||
pass_filenames: false
|
hooks:
|
||||||
|
- id: mypy
|
||||||
|
files: cibuildwheel/|test/
|
||||||
|
pass_filenames: false
|
||||||
|
|||||||
@@ -117,11 +117,12 @@ class DockerContainer:
|
|||||||
|
|
||||||
return [PurePath(p) for p in path_strs]
|
return [PurePath(p) for p in path_strs]
|
||||||
|
|
||||||
def call(self, args: Sequence[Union[str, PathLike]], env: Dict[str, str] = {},
|
def call(self, args: Sequence[Union[str, PathLike]], env: Optional[Dict[str, str]] = None,
|
||||||
capture_output=False, cwd: Optional[Union[str, PathLike]] = None) -> str:
|
capture_output=False, cwd: Optional[Union[str, PathLike]] = None) -> str:
|
||||||
|
|
||||||
chdir = f'cd {cwd}' if cwd else ''
|
chdir = f'cd {cwd}' if cwd else ''
|
||||||
env_assignments = ' '.join(f'{shlex.quote(k)}={shlex.quote(v)}'
|
env_assignments = ' '.join(f'{shlex.quote(k)}={shlex.quote(v)}'
|
||||||
for k, v in env.items())
|
for k, v in env.items()) if env is not None else ''
|
||||||
command = ' '.join(shlex.quote(str(a)) for a in args)
|
command = ' '.join(shlex.quote(str(a)) for a in args)
|
||||||
end_of_message = str(uuid.uuid4())
|
end_of_message = str(uuid.uuid4())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user