feature/handlers - add base utils for handlers #4

Merged
geekiot merged 6 commits from feature/handlers into develop 2025-10-21 00:06:30 +05:00
2 changed files with 8 additions and 4 deletions
Showing only changes of commit 45cffe2216 - Show all commits

View file

@ -37,6 +37,9 @@ ignore = []
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.per-file-ignores]
"scripts/**/*.py" = ["T201"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"

View file

@ -19,7 +19,8 @@ LOCALES_WIDTH = 80
def run_cmd(cmds: list[list[str]]) -> None:
try:
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
cmd,
capture_output=True,
@ -27,9 +28,9 @@ def run_cmd(cmds: list[list[str]]) -> None:
check=True,
shell=False,
)
print(result.stderr) # noqa: T201
print(result.stderr)
except Exception as error:
print(f"Error: {error}") # noqa: T201
print(f"Error: {error}")
def main() -> None:
@ -57,7 +58,7 @@ def main() -> None:
args = parser.parse_args()
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
cmd = list()