diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2021-12-27 09:16:03 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-12-27 09:16:03 +0100 |
commit | fcdc2c2cd26e24c2aa3f064d93cee3e29dc2a30c (patch) | |
tree | 3e508c94d5ac69869aa69fc686cd54e02bfcad27 /searxng_extra | |
parent | c849731eb1df23b8509a947fcc2807adb34dc730 (diff) | |
download | searxng-fcdc2c2cd26e24c2aa3f064d93cee3e29dc2a30c.tar.gz searxng-fcdc2c2cd26e24c2aa3f064d93cee3e29dc2a30c.zip |
[format.python] disable py code formatting for some hunks of code
Disable the python code formatting from python-black, where the readability of
code suffers by formatting.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searxng_extra')
-rwxr-xr-x | searxng_extra/update/update_engine_descriptions.py | 2 | ||||
-rwxr-xr-x | searxng_extra/update/update_firefox_version.py | 4 | ||||
-rwxr-xr-x | searxng_extra/update/update_pygments.py | 112 |
3 files changed, 62 insertions, 56 deletions
diff --git a/searxng_extra/update/update_engine_descriptions.py b/searxng_extra/update/update_engine_descriptions.py index 59a9a72a0..2e16e1029 100755 --- a/searxng_extra/update/update_engine_descriptions.py +++ b/searxng_extra/update/update_engine_descriptions.py @@ -55,7 +55,9 @@ NOT_A_DESCRIPTION = [ ] SKIP_ENGINE_SOURCE = [ + # fmt: off ('gitlab', 'wikidata') # descriptions are about wikipedia disambiguation pages + # fmt: on ] LANGUAGES = LOCALE_NAMES.keys() diff --git a/searxng_extra/update/update_firefox_version.py b/searxng_extra/update/update_firefox_version.py index 07bcef7f6..3b536f296 100755 --- a/searxng_extra/update/update_firefox_version.py +++ b/searxng_extra/update/update_firefox_version.py @@ -19,10 +19,12 @@ NORMAL_REGEX = re.compile('^[0-9]+\.[0-9](\.[0-9])?$') # useragents = { + # fmt: off "versions": (), "os": ('Windows NT 10.0; Win64; x64', 'X11; Linux x86_64'), - "ua": "Mozilla/5.0 ({os}; rv:{version}) Gecko/20100101 Firefox/{version}" + "ua": "Mozilla/5.0 ({os}; rv:{version}) Gecko/20100101 Firefox/{version}", + # fmt: on } diff --git a/searxng_extra/update/update_pygments.py b/searxng_extra/update/update_pygments.py index 3b1c525a5..fee63faa5 100755 --- a/searxng_extra/update/update_pygments.py +++ b/searxng_extra/update/update_pygments.py @@ -26,61 +26,63 @@ class LogicodevStyle(Style): # pylint: disable=R0903 background_color = '#282C34' styles = { - Comment: "#556366 italic", - Comment.Multiline: "#556366 italic", - Comment.Preproc: "#BC7A00", - Comment.Single: "#556366 italic", - Comment.Special: "#556366 italic", - Error: "border:#ff0000", - Generic.Deleted: "#A00000", - Generic.Emph: "italic", - Generic.Error: "#FF0000", - Generic.Heading: "#000080 bold", - Generic.Inserted: "#00A000", - Generic.Output: "#888888", - Generic.Prompt: "#000080 bold", - Generic.Strong: "bold", - Generic.Subheading: "#800080 bold", - Generic.Traceback: "#0044DD", - Keyword: "#BE74D5 bold", - Keyword.Constant: "#BE74D5 bold", - Keyword.Declaration: "#BE74D5 bold", - Keyword.Namespace: "#BE74D5 bold", - Keyword.Pseudo: "#BE74D5", - Keyword.Reserved: "#BE74D5 bold", - Keyword.Type: "#D46C72", - Literal.Number: "#D19A66", - Literal.String: "#86C372", - Literal.String.Backtick:"#86C372", - Literal.String.Char: "#86C372", - Literal.String.Doc: "#86C372 italic", - Literal.String.Double: "#86C372", - Literal.String.Escape: "#BB6622 bold", - Literal.String.Heredoc: "#86C372", - Literal.String.Interpol:"#BB6688 bold", - Literal.String.Other: "#BE74D5", - Literal.String.Regex: "#BB6688", - Literal.String.Single: "#86C372", - Literal.String.Symbol: "#DFC06F", - Name.Attribute: "#7D9029", - Name.Builtin: "#BE74D5", - Name.Builtin.Pseudo: "#BE74D5", - Name.Class: "#61AFEF bold", - Name.Constant: "#D19A66", - Name.Decorator: "#AA22FF", - Name.Entity: "#999999 bold", - Name.Exception: "#D2413A bold", - Name.Function: "#61AFEF", - Name.Label: "#A0A000", - Name.Namespace: "#61AFEF bold", - Name.Tag: "#BE74D5 bold", - Name.Variable: "#DFC06F", - Name.Variable.Class: "#DFC06F", - Name.Variable.Global: "#DFC06F", - Name.Variable.Instance: "#DFC06F", - Operator: "#D19A66", - Operator.Word: "#AA22FF bold", - Text.Whitespace: "#D7DAE0", + # fmt: off + Comment: "#556366 italic", + Comment.Multiline: "#556366 italic", + Comment.Preproc: "#BC7A00", + Comment.Single: "#556366 italic", + Comment.Special: "#556366 italic", + Error: "border:#ff0000", + Generic.Deleted: "#A00000", + Generic.Emph: "italic", + Generic.Error: "#FF0000", + Generic.Heading: "#000080 bold", + Generic.Inserted: "#00A000", + Generic.Output: "#888888", + Generic.Prompt: "#000080 bold", + Generic.Strong: "bold", + Generic.Subheading: "#800080 bold", + Generic.Traceback: "#0044DD", + Keyword: "#BE74D5 bold", + Keyword.Constant: "#BE74D5 bold", + Keyword.Declaration: "#BE74D5 bold", + Keyword.Namespace: "#BE74D5 bold", + Keyword.Pseudo: "#BE74D5", + Keyword.Reserved: "#BE74D5 bold", + Keyword.Type: "#D46C72", + Literal.Number: "#D19A66", + Literal.String: "#86C372", + Literal.String.Backtick: "#86C372", + Literal.String.Char: "#86C372", + Literal.String.Doc: "#86C372 italic", + Literal.String.Double: "#86C372", + Literal.String.Escape: "#BB6622 bold", + Literal.String.Heredoc: "#86C372", + Literal.String.Interpol: "#BB6688 bold", + Literal.String.Other: "#BE74D5", + Literal.String.Regex: "#BB6688", + Literal.String.Single: "#86C372", + Literal.String.Symbol: "#DFC06F", + Name.Attribute: "#7D9029", + Name.Builtin: "#BE74D5", + Name.Builtin.Pseudo: "#BE74D5", + Name.Class: "#61AFEF bold", + Name.Constant: "#D19A66", + Name.Decorator: "#AA22FF", + Name.Entity: "#999999 bold", + Name.Exception: "#D2413A bold", + Name.Function: "#61AFEF", + Name.Label: "#A0A000", + Name.Namespace: "#61AFEF bold", + Name.Tag: "#BE74D5 bold", + Name.Variable: "#DFC06F", + Name.Variable.Class: "#DFC06F", + Name.Variable.Global: "#DFC06F", + Name.Variable.Instance: "#DFC06F", + Operator: "#D19A66", + Operator.Word: "#AA22FF bold", + Text.Whitespace: "#D7DAE0", + # fmt: on } |