From 10f71be39bfad4eb77800b71b3ac428d5607d401 Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Thu, 21 Nov 2024 19:39:55 +0100 Subject: [PATCH] Ruff --- socials_util/__init__.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/socials_util/__init__.py b/socials_util/__init__.py index 448a029..86bfaae 100644 --- a/socials_util/__init__.py +++ b/socials_util/__init__.py @@ -211,14 +211,15 @@ RE_ID = r'@?([^\s/]+)' RE_DUAL_ID = r'@?([^\s/]+/[^\s/]+)' RE_ANY_SUBPATH = r'(|\/|\/\S*)$' -SPECIAL_REGEX_LITERALS = frozenset({RE_ID, RE_DUAL_ID, RE_ANY_SUBPATH, - RE_ID_AT, RE_ID_NOAT}) +SPECIAL_REGEX_LITERALS = frozenset( + {RE_ID, RE_DUAL_ID, RE_ANY_SUBPATH, RE_ID_AT, RE_ID_NOAT}, +) REGEX_LITERALS_TO_FORMATTER = { - RE_ID: '{id}', - RE_ID_AT: '@{id}', - RE_ID_NOAT: '{id}', - RE_DUAL_ID: '{id}', - RE_ANY_SUBPATH: '', + RE_ID: '{id}', + RE_ID_AT: '@{id}', + RE_ID_NOAT: '{id}', + RE_DUAL_ID: '{id}', + RE_ANY_SUBPATH: '', } DOES_NOT_NEED_AUTO_SLASH = frozenset({RE_ANY_SUBPATH})