generated from geekiot/python-template
Merge branch 'develop' into feature/handlers
This commit is contained in:
commit
45cffe2216
2 changed files with 8 additions and 4 deletions
|
|
@ -37,6 +37,9 @@ ignore = []
|
||||||
fixable = ["ALL"]
|
fixable = ["ALL"]
|
||||||
unfixable = []
|
unfixable = []
|
||||||
|
|
||||||
|
[tool.ruff.lint.per-file-ignores]
|
||||||
|
"scripts/**/*.py" = ["T201"]
|
||||||
|
|
||||||
[tool.ruff.format]
|
[tool.ruff.format]
|
||||||
quote-style = "double"
|
quote-style = "double"
|
||||||
indent-style = "space"
|
indent-style = "space"
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@ LOCALES_WIDTH = 80
|
||||||
def run_cmd(cmds: list[list[str]]) -> None:
|
def run_cmd(cmds: list[list[str]]) -> None:
|
||||||
try:
|
try:
|
||||||
for cmd in cmds:
|
for cmd in cmds:
|
||||||
# INFO: User input is safe.
|
# DEBUG: User input is completely safe,
|
||||||
|
# as it only accepts specific values.
|
||||||
result = subprocess.run( # noqa: S603
|
result = subprocess.run( # noqa: S603
|
||||||
cmd,
|
cmd,
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
|
|
@ -27,9 +28,9 @@ def run_cmd(cmds: list[list[str]]) -> None:
|
||||||
check=True,
|
check=True,
|
||||||
shell=False,
|
shell=False,
|
||||||
)
|
)
|
||||||
print(result.stderr) # noqa: T201
|
print(result.stderr)
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
print(f"Error: {error}") # noqa: T201
|
print(f"Error: {error}")
|
||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
|
|
@ -57,7 +58,7 @@ def main() -> None:
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.operation == "init" and args.language == "all":
|
if args.operation == "init" and args.language == "all":
|
||||||
print("Error: You need to specify new language.") # noqa: T201
|
print("Error: You need to specify new language.")
|
||||||
return
|
return
|
||||||
|
|
||||||
cmd = list()
|
cmd = list()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue