From 4c38a309fcdbc408078f1ffc04a71102af66e67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Tue, 18 Sep 2018 17:58:39 +0200 Subject: [PATCH] Fix pylint errors - deprecated-method - anomalous-backslash-in-string - cell-var-from-loop - undefined-loop-variable --- gajim/command_system/framework.py | 2 +- gajim/common/config.py | 2 +- gajim/common/optparser.py | 2 +- gajim/common/zeroconf/zeroconf_bonjour.py | 2 +- gajim/dataforms_widget.py | 6 +++--- gajim/dialogs.py | 10 +++++----- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gajim/command_system/framework.py b/gajim/command_system/framework.py index a7ade6344..0dfdbaa9f 100644 --- a/gajim/command_system/framework.py +++ b/gajim/command_system/framework.py @@ -215,7 +215,7 @@ class Command: Extract handler's arguments specification, as it was defined preserving their order. """ - names, var_args, var_kwargs, defaults = getargspec(self.handler) + names, var_args, var_kwargs, defaults = getargspec(self.handler) # pylint: disable=W1505 # Behavior of this code need to be checked. Might yield # incorrect results on some rare occasions. diff --git a/gajim/common/config.py b/gajim/common/config.py index 9814917b2..efe1237d5 100644 --- a/gajim/common/config.py +++ b/gajim/common/config.py @@ -48,7 +48,7 @@ class Option(IntEnum): opt_int = ['integer', 0] opt_str = ['string', 0] opt_bool = ['boolean', 0] -opt_color = ['color', '^(#[0-9a-fA-F]{6})|()|rgb\(\d+,\d+,\d+\)|rgba\(\d+,\d+,\d+,[01]\.?\d*\)$'] +opt_color = ['color', r'(#[0-9a-fA-F]{6})|rgb\(\d+,\d+,\d+\)|rgba\(\d+,\d+,\d+,[01]\.?\d*\)'] opt_one_window_types = ['never', 'always', 'always_with_roster', 'peracct', 'pertype'] opt_show_roster_on_startup = ['always', 'never', 'last_state'] opt_treat_incoming_messages = ['', 'chat', 'normal'] diff --git a/gajim/common/optparser.py b/gajim/common/optparser.py index 452c13d16..93bb88797 100644 --- a/gajim/common/optparser.py +++ b/gajim/common/optparser.py @@ -59,7 +59,7 @@ class OptionsParser: for line in fd: match = regex.match(line) if match is None: - log.warn('Invalid configuration line, ignoring it: %s', line) + log.warning('Invalid configuration line, ignoring it: %s', line) continue optname, key, subname, value = match.groups() if key is None: diff --git a/gajim/common/zeroconf/zeroconf_bonjour.py b/gajim/common/zeroconf/zeroconf_bonjour.py index 03e5171c0..29a2405fc 100644 --- a/gajim/common/zeroconf/zeroconf_bonjour.py +++ b/gajim/common/zeroconf/zeroconf_bonjour.py @@ -121,7 +121,7 @@ class Zeroconf: } # Split on '.' but do not split on '\.' - result = re.split('(?