Code - Remove unused f-strings (#3209)

apprise-193
Jost Alemann 2025-05-22 10:11:39 +00:00 zatwierdzone przez GitHub
rodzic fcd6ebe0ee
commit 9b7372fff0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
7 zmienionych plików z 9 dodań i 9 usunięć

Wyświetl plik

@ -89,7 +89,7 @@ class difference_detection_processor():
proxy_url = self.datastore.proxy_list.get(preferred_proxy_id).get('url')
logger.debug(f"Selected proxy key '{preferred_proxy_id}' as proxy URL '{proxy_url}' for {url}")
else:
logger.debug(f"Skipping adding proxy data when custom Browser endpoint is specified. ")
logger.debug("Skipping adding proxy data when custom Browser endpoint is specified. ")
# Now call the fetcher (playwright/requests/etc) with arguments that only a fetcher would need.
# When browser_connection_url is None, it method should default to working out whats the best defaults (os env vars etc)

Wyświetl plik

@ -79,7 +79,7 @@ def get_itemprop_availability(html_content) -> Restock:
# First phase, dead simple scanning of anything that looks useful
value = Restock()
if data:
logger.debug(f"Using jsonpath to find price/availability/etc")
logger.debug("Using jsonpath to find price/availability/etc")
price_parse = parse('$..(price|Price)')
pricecurrency_parse = parse('$..(pricecurrency|currency|priceCurrency )')
availability_parse = parse('$..(availability|Availability)')
@ -110,7 +110,7 @@ def get_itemprop_availability(html_content) -> Restock:
# Second, go dig OpenGraph which is something that jsonpath_ng cant do because of the tuples and double-dots (:)
if not value.get('price') or value.get('availability'):
logger.debug(f"Alternatively digging through OpenGraph properties for restock/price info..")
logger.debug("Alternatively digging through OpenGraph properties for restock/price info..")
jsonpath_expr = parse('$..properties')
for match in jsonpath_expr.find(data):

Wyświetl plik

@ -15,7 +15,7 @@ def _task(watch, update_handler):
except FilterNotFoundInResponse as e:
text_after_filter = f"Filter not found in HTML: {str(e)}"
except ReplyWithContentButNoText as e:
text_after_filter = f"Filter found but no text (empty result)"
text_after_filter = "Filter found but no text (empty result)"
except Exception as e:
text_after_filter = f"Error: {str(e)}"

Wyświetl plik

@ -7,7 +7,7 @@ from ..util import live_server_setup, wait_for_all_checks
def do_test(client, live_server, make_test_use_extra_browser=False):
# Grep for this string in the logs?
test_url = f"https://changedetection.io/ci-test.html?non-custom-default=true"
test_url = "https://changedetection.io/ci-test.html?non-custom-default=true"
# "non-custom-default" should not appear in the custom browser connection
custom_browser_name = 'custom browser URL'
@ -51,7 +51,7 @@ def do_test(client, live_server, make_test_use_extra_browser=False):
url_for("ui.ui_edit.edit_page", uuid="first"),
data={
# 'run_customer_browser_url_tests.sh' will search for this string to know if we hit the right browser container or not
"url": f"https://changedetection.io/ci-test.html?custom-browser-search-string=1",
"url": "https://changedetection.io/ci-test.html?custom-browser-search-string=1",
"tags": "",
"headers": "",
'fetch_backend': f"extra_browser_{custom_browser_name}",

Wyświetl plik

@ -7,7 +7,7 @@ from changedetectionio.tests.util import live_server_setup, wait_for_all_checks,
def set_response():
import time
data = f"""<html>
data = """<html>
<body>
<h1>Awesome, you made it</h1>
yeah the socks request worked

Wyświetl plik

@ -6,7 +6,7 @@ from changedetectionio.tests.util import live_server_setup, wait_for_all_checks
def set_response():
import time
data = f"""<html>
data = """<html>
<body>
<h1>Awesome, you made it</h1>
yeah the socks request worked

Wyświetl plik

@ -6,7 +6,7 @@ from changedetectionio.tests.util import live_server_setup, wait_for_all_checks,
def set_response():
data = f"""<html>
data = """<html>
<body>Awesome, you made it<br>
yeah the socks request worked<br>
something to ignore<br>