Mercurial > libervia-backend
comparison libervia/backend/plugins/plugin_comp_ap_gateway/regex.py @ 4270:0d7bb4df2343
Reformatted code base using black.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 19 Jun 2024 18:44:57 +0200 |
parents | 4b842c1fb686 |
children |
comparison
equal
deleted
inserted
replaced
4269:64a85ce8be70 | 4270:0d7bb4df2343 |
---|---|
40 # / obs-text | 40 # / obs-text |
41 # quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) | 41 # quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) |
42 # obs-text = %x80-FF | 42 # obs-text = %x80-FF |
43 # --- | 43 # --- |
44 | 44 |
45 ows = '[ \t]*' | 45 ows = "[ \t]*" |
46 bws = f'{ows}' | 46 bws = f"{ows}" |
47 obs_text = '[\\x80-\\xff]' | 47 obs_text = "[\\x80-\\xff]" |
48 qdtext = f'([\t !#-\\[\\]-~]|{obs_text})' | 48 qdtext = f"([\t !#-\\[\\]-~]|{obs_text})" |
49 quoted_pair = f'\\\\([\t !-~]|{obs_text})' | 49 quoted_pair = f"\\\\([\t !-~]|{obs_text})" |
50 quoted_string = f'"({qdtext}|{quoted_pair})*"' | 50 quoted_string = f'"({qdtext}|{quoted_pair})*"' |
51 tchar = "([!#$%&`*+\\-.^_]|\\\\'|[|~0-9a-zA-Z])" | 51 tchar = "([!#$%&`*+\\-.^_]|\\\\'|[|~0-9a-zA-Z])" |
52 token = f'({tchar})+' | 52 token = f"({tchar})+" |
53 RE_SIG_PARAM = re.compile( | 53 RE_SIG_PARAM = re.compile( |
54 f'(?P<key>{token}{bws})={bws}' | 54 f"(?P<key>{token}{bws})={bws}" |
55 f'((?P<uq_value>{token})|(?P<quoted_value>{quoted_string}))' | 55 f"((?P<uq_value>{token})|(?P<quoted_value>{quoted_string}))" |
56 ) | 56 ) |
57 | 57 |
58 | 58 |
59 ## Account/Mention | 59 ## Account/Mention |
60 | 60 |