style: format with ruff
Some checks failed
CI / Lint & Format (push) Failing after 17s
CI / Tests (push) Has been skipped
CI / Security Scan (push) Failing after 21s

This commit is contained in:
Username
2025-12-20 18:32:47 +01:00
parent d0b199de11
commit d364c954d8
2 changed files with 39 additions and 6 deletions

39
fpaste
View File

@@ -710,10 +710,41 @@ def is_file_path(arg):
# Check for common file extensions
if "." in arg and not arg.startswith("."):
ext = arg.rsplit(".", 1)[-1].lower()
if ext in ("txt", "md", "py", "js", "json", "yaml", "yml", "xml", "html",
"css", "sh", "bash", "c", "cpp", "h", "go", "rs", "java",
"rb", "php", "sql", "log", "conf", "cfg", "ini", "png",
"jpg", "jpeg", "gif", "pdf", "zip", "tar", "gz"):
if ext in (
"txt",
"md",
"py",
"js",
"json",
"yaml",
"yml",
"xml",
"html",
"css",
"sh",
"bash",
"c",
"cpp",
"h",
"go",
"rs",
"java",
"rb",
"php",
"sql",
"log",
"conf",
"cfg",
"ini",
"png",
"jpg",
"jpeg",
"gif",
"pdf",
"zip",
"tar",
"gz",
):
return True
return False