mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-20 07:43:20 +00:00
fix(lint): resolve Ruff E701/E702 and exclude build artifacts
- Fix E701 by expanding single-line class and loop statements into blocks - Fix E702 by splitting semicolon-separated statements - Exclude build/, dist/, venv, and egg-info from Ruff linting - Apply fixes consistently to source and generated files No runtime behavior changes; lint-only cleanup to stabilize CI. https://chatgpt.com/share/6942c9e3-80fc-800f-b471-5e1ee567f8fe
This commit is contained in:
@@ -8,7 +8,8 @@ from ansible.errors import AnsibleUndefinedVariable
|
|||||||
try:
|
try:
|
||||||
from ansible.utils.unsafe_proxy import AnsibleUndefined
|
from ansible.utils.unsafe_proxy import AnsibleUndefined
|
||||||
except ImportError:
|
except ImportError:
|
||||||
class AnsibleUndefined: pass
|
class AnsibleUndefined:
|
||||||
|
pass
|
||||||
|
|
||||||
class AppConfigKeyError(AnsibleFilterError, ValueError):
|
class AppConfigKeyError(AnsibleFilterError, ValueError):
|
||||||
"""
|
"""
|
||||||
|
|||||||
3
main.py
3
main.py
@@ -243,7 +243,8 @@ def _call_sound(method_name: str):
|
|||||||
|
|
||||||
def _play_in_child(method_name: str) -> bool:
|
def _play_in_child(method_name: str) -> bool:
|
||||||
p = Process(target=_call_sound, args=(method_name,))
|
p = Process(target=_call_sound, args=(method_name,))
|
||||||
p.start(); p.join()
|
p.start()
|
||||||
|
p.join()
|
||||||
if p.exitcode != 0:
|
if p.exitcode != 0:
|
||||||
try:
|
try:
|
||||||
# Sichtbare Diagnose, wenn das Kind crasht/fehlschlägt
|
# Sichtbare Diagnose, wenn das Kind crasht/fehlschlägt
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ from ansible.errors import AnsibleUndefinedVariable
|
|||||||
try:
|
try:
|
||||||
from ansible.utils.unsafe_proxy import AnsibleUndefined
|
from ansible.utils.unsafe_proxy import AnsibleUndefined
|
||||||
except ImportError:
|
except ImportError:
|
||||||
class AnsibleUndefined: pass
|
class AnsibleUndefined:
|
||||||
|
pass
|
||||||
|
|
||||||
class AppConfigKeyError(AnsibleFilterError, ValueError):
|
class AppConfigKeyError(AnsibleFilterError, ValueError):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -46,3 +46,12 @@ packages = { find = { where = ["."], include = [
|
|||||||
"__pycache__*",
|
"__pycache__*",
|
||||||
] } }
|
] } }
|
||||||
include-package-data = true
|
include-package-data = true
|
||||||
|
|
||||||
|
[tool.ruff]
|
||||||
|
exclude = [
|
||||||
|
"build",
|
||||||
|
"dist",
|
||||||
|
"*.egg-info",
|
||||||
|
".venv",
|
||||||
|
"venv",
|
||||||
|
]
|
||||||
@@ -4,9 +4,11 @@ def cdn_dirs(tree):
|
|||||||
out = set()
|
out = set()
|
||||||
def walk(v):
|
def walk(v):
|
||||||
if isinstance(v, dict):
|
if isinstance(v, dict):
|
||||||
for x in v.values(): walk(x)
|
for x in v.values():
|
||||||
|
walk(x)
|
||||||
elif isinstance(v, list):
|
elif isinstance(v, list):
|
||||||
for x in v: walk(x)
|
for x in v:
|
||||||
|
walk(x)
|
||||||
elif isinstance(v, str) and os.path.isabs(v):
|
elif isinstance(v, str) and os.path.isabs(v):
|
||||||
out.add(v)
|
out.add(v)
|
||||||
walk(tree)
|
walk(tree)
|
||||||
|
|||||||
Reference in New Issue
Block a user