From ba602fb98f044ea9a108521eb0980ef07bebe469 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Tue, 5 Mar 2024 00:31:10 +0100 Subject: [PATCH] Improve code quality (thanks @merwok). --- freeze/scanner.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/freeze/scanner.py b/freeze/scanner.py index 200eea9..44ae746 100644 --- a/freeze/scanner.py +++ b/freeze/scanner.py @@ -110,11 +110,7 @@ def scan_url(url): path = os.path.normpath(url.replace(site_url, "")) - if ( - path.endswith(".html") - or path.endswith("sitemap.xml") - or path.endswith("robots.txt") - ): + if path.endswith((".html", "sitemap.xml", "robots.txt")): logger.debug(f"path (file) -> {path}") file_slash = path.rfind("/") + 1 file_dirs = path[0:file_slash]