diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2022-09-27 17:01:00 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2022-09-27 18:32:14 +0200 |
commit | ba8959ad7c18ce4165d29b7a472d845bd96f4735 (patch) | |
tree | 70da2e25a94588348fd5e66890a4a9fceb9e1ff2 /searx/preferences.py | |
parent | 94c4cc126b16d4cd1653c410df63af4bc0a4e998 (diff) | |
download | searxng-ba8959ad7c18ce4165d29b7a472d845bd96f4735.tar.gz searxng-ba8959ad7c18ce4165d29b7a472d845bd96f4735.zip |
[fix] typos / reported by @kianmeng in searx PR-3366
[PR-3366] https://github.com/searx/searx/pull/3366
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/preferences.py')
-rw-r--r-- | searx/preferences.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/searx/preferences.py b/searx/preferences.py index fdb4f5008..8efa737fe 100644 --- a/searx/preferences.py +++ b/searx/preferences.py @@ -52,7 +52,7 @@ class Setting: return self.value def save(self, name: str, resp: flask.Response): - """Save cookie ``name`` in the HTTP reponse obect + """Save cookie ``name`` in the HTTP response object If needed, its overwritten in the inheritance.""" resp.set_cookie(name, self.value, max_age=COOKIE_MAX_AGE) @@ -113,7 +113,7 @@ class MultipleChoiceSetting(Setting): self.value.append(choice) def save(self, name: str, resp: flask.Response): - """Save cookie ``name`` in the HTTP reponse obect""" + """Save cookie ``name`` in the HTTP response object""" resp.set_cookie(name, ','.join(self.value), max_age=COOKIE_MAX_AGE) @@ -146,7 +146,7 @@ class SetSetting(Setting): self.values = set(elements) def save(self, name: str, resp: flask.Response): - """Save cookie ``name`` in the HTTP reponse obect""" + """Save cookie ``name`` in the HTTP response object""" resp.set_cookie(name, ','.join(self.values), max_age=COOKIE_MAX_AGE) @@ -193,7 +193,7 @@ class MapSetting(Setting): self.key = data # pylint: disable=attribute-defined-outside-init def save(self, name: str, resp: flask.Response): - """Save cookie ``name`` in the HTTP reponse obect""" + """Save cookie ``name`` in the HTTP response object""" if hasattr(self, 'key'): resp.set_cookie(name, self.key, max_age=COOKIE_MAX_AGE) @@ -239,7 +239,7 @@ class BooleanChoices: return (k for k, v in self.choices.items() if not v) def save(self, resp: flask.Response): - """Save cookie in the HTTP reponse obect""" + """Save cookie in the HTTP response object""" disabled_changed = (k for k in self.disabled if self.default_choices[k]) enabled_changed = (k for k in self.enabled if not self.default_choices[k]) resp.set_cookie('disabled_{0}'.format(self.name), ','.join(disabled_changed), max_age=COOKIE_MAX_AGE) @@ -496,7 +496,7 @@ class Preferences: return ret_val def save(self, resp: flask.Response): - """Save cookie in the HTTP reponse obect""" + """Save cookie in the HTTP response object""" for user_setting_name, user_setting in self.key_value_settings.items(): # pylint: disable=unnecessary-dict-index-lookup if self.key_value_settings[user_setting_name].locked: |