Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#25)
Browse files Browse the repository at this point in the history
updates:
- [github.com/Lucas-C/pre-commit-hooks.git: v1.5.1 → v1.5.4](https://github.com/Lucas-C/pre-commit-hooks.git/compare/v1.5.1...v1.5.4)
- [github.com/pre-commit/pre-commit-hooks.git: v4.4.0 → v4.5.0](https://github.com/pre-commit/pre-commit-hooks.git/compare/v4.4.0...v4.5.0)
- [github.com/adrienverge/yamllint.git: v1.32.0 → v1.33.0](https://github.com/adrienverge/yamllint.git/compare/v1.32.0...v1.33.0)
- [github.com/PyCQA/flake8.git: 6.0.0 → 6.1.0](https://github.com/PyCQA/flake8.git/compare/6.0.0...6.1.0)

* Keep flake8 at 4.0.1
* Pylint 3 is not working
  Hitting RecursionError and astroid.exceptions.AstroidError

* Remove unnecessary else clause after return in except
* Use fully qualified name for exceptions
  • Loading branch information
pre-commit-ci[bot] authored Jan 3, 2024
1 parent 5464561 commit b03d662
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 25 deletions.
12 changes: 5 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ci:
skip:
- add-trailing-comma # v3.0.0 only supports Python >=3.6
- flake8 # This is kept at v4 for until WPS starts supporting flake v5
- pylint # Getting exceptions running with pylint >=3

repos:
- repo: https://github.com/asottile/add-trailing-comma.git
Expand All @@ -13,7 +14,7 @@ repos:
- id: add-trailing-comma

- repo: https://github.com/Lucas-C/pre-commit-hooks.git
rev: v1.5.1
rev: v1.5.4
hooks:
- id: remove-tabs

Expand All @@ -30,7 +31,7 @@ repos:
^.*\.rst$
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.4.0
rev: v4.5.0
hooks:
# Side-effects:
- id: trailing-whitespace
Expand Down Expand Up @@ -72,7 +73,7 @@ repos:
- id: debug-statements

- repo: https://github.com/adrienverge/yamllint.git
rev: v1.32.0
rev: v1.33.0
hooks:
- id: yamllint
types:
Expand All @@ -82,7 +83,7 @@ repos:
- --strict

- repo: https://github.com/PyCQA/flake8.git
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
alias: flake8-no-wps
Expand Down Expand Up @@ -114,8 +115,5 @@ repos:
rev: v2.15.9
hooks:
- id: pylint
additional_dependencies:
- ansible-core ~= 2.14.0b1
- pylint-pytest < 1.1.0

...
4 changes: 2 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -598,5 +598,5 @@ preferred-modules=
# Exceptions that will emit a warning when being caught. Defaults to
# "BaseException, Exception".
overgeneral-exceptions=
BaseException,
Exception,
builtins.BaseException,
builtins.Exception,
32 changes: 16 additions & 16 deletions plugins/modules/parallels_desktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,22 +651,22 @@ def ensure_app_terminated( # noqa: WPS231
'msg': str(lookup_error),
'changed': False,
}
else:
terminate_parallels = process_syscall_errors(
partial(os.kill, parallels_pid, signal.SIGTERM),
)
destroy_parallels = process_syscall_errors(
partial(os.kill, parallels_pid, signal.SIGKILL),
)
parallels_termination_stages = (
(
'terminated',
self.kindly_ask_parallels_desktop_app_to_quit,
100,
),
('killed', terminate_parallels, 100),
('murdered', destroy_parallels, 5),
)

terminate_parallels = process_syscall_errors(
partial(os.kill, parallels_pid, signal.SIGTERM),
)
destroy_parallels = process_syscall_errors(
partial(os.kill, parallels_pid, signal.SIGKILL),
)
parallels_termination_stages = (
(
'terminated',
self.kindly_ask_parallels_desktop_app_to_quit,
100,
),
('killed', terminate_parallels, 100),
('murdered', destroy_parallels, 5),
)

self.ensure_running_vms_stopped()

Expand Down

0 comments on commit b03d662

Please sign in to comment.