chore: auto-format & formatter warnings

This commit is contained in:
relikd
2025-06-09 00:07:17 +02:00
parent 2604eed96e
commit 5a2cb5f1e9
2 changed files with 5 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ import re
import sys import sys
import sqlite3 import sqlite3
from base64 import b64encode from base64 import b64encode
from urllib.parse import quote # from urllib.parse import quote
from typing import List, Dict, Any, Iterable, Optional from typing import List, Dict, Any, Iterable, Optional
ITEM_COUNTER = 0 ITEM_COUNTER = 0
@@ -11,6 +11,7 @@ rx_query = re.compile(r'SELECT([\s\S]*)FROM[\s]+([A-Z_]+)')
rx_cols = re.compile(r'[\s,;](Z[A-Z_]+)') rx_cols = re.compile(r'[\s,;](Z[A-Z_]+)')
rx_tags = re.compile(r'\%\{[A-Za-z_]+?\}') rx_tags = re.compile(r'\%\{[A-Za-z_]+?\}')
# =============================== # ===============================
# Helper methods # Helper methods
# =============================== # ===============================
@@ -61,6 +62,7 @@ def sanitize(cursor: sqlite3.Cursor, query: str) -> str:
query = query.replace(missing, 'NULL') query = query.replace(missing, 'NULL')
return query return query
# =============================== # ===============================
# VCARD Attributes # VCARD Attributes
# =============================== # ===============================
@@ -279,7 +281,7 @@ class Service(Queryable):
# Dear Apple, why do you do such weird shit, URL encoding? bah! # Dear Apple, why do you do such weird shit, URL encoding? bah!
# Even worse, you break it so that reimport fails. # Even worse, you break it so that reimport fails.
# user = quote(self.username, safe='!/()=_:.\'$&').replace('%2C', '\\,') # user= quote(self.username, safe='!/()=_:.\'$&').replace('%2C', '\\,')
user = self.username user = self.username
return buildLabel('IMPP;X-SERVICE-TYPE=' + self.service, self.label, return buildLabel('IMPP;X-SERVICE-TYPE=' + self.service, self.label,
markPref, typ + ':' + user) markPref, typ + ':' + user)

View File

@@ -59,7 +59,7 @@ def main() -> None:
export_count += 1 export_count += 1
except Exception as e: except Exception as e:
print(f'Error processing contact {rec.id} {rec.fullname}: {e}', print(f'Error processing contact {rec.id} {rec.fullname}: {e}',
file=sys.stderr) file=sys.stderr)
# choose which export mode to use # choose which export mode to use
if args.split: # multi-file mode if args.split: # multi-file mode