mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-25 14:40:16 -05:00
Removes several pylint warnings.
This patche removes 93 pylint deprecation warnings due to invalid escape sequences (mostly 'invalid escape sequence \d') on unicode strings. Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
1 parent
bc53544c6f
commit
c898be1df9
32 files changed
+84
-77
No files matched your search
+1
-1
@@ -554,7 +554,7 @@ class NSSDatabase:
|
||||
chain = result.output.splitlines()
|
||||
|
||||
for c in chain:
|
||||
m = re.match('\s*"(.*)" \[.*', c)
|
||||
m = re.match(r'\s*"(.*)" \[.*', c)
|
||||
if m:
|
||||
root_nicknames.append(m.groups()[0])
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
'''
|
||||
r'''
|
||||
|
||||
Goal
|
||||
----
|
||||
|
||||
@@ -310,7 +310,7 @@ def template_str(txt, vars):
|
||||
# eval() is a special string one can insert into a template to have the
|
||||
# Python interpreter evaluate the string. This is intended to allow
|
||||
# math to be performed in templates.
|
||||
pattern = re.compile('(eval\s*\(([^()]*)\))')
|
||||
pattern = re.compile(r'(eval\s*\(([^()]*)\))')
|
||||
val = pattern.sub(lambda x: str(eval(x.group(2))), val)
|
||||
|
||||
return val
|
||||
@@ -1145,7 +1145,7 @@ def config_replace_variables(filepath, replacevars=dict(), appendvars=dict(),
|
||||
One have to run restore_context(filepath) afterwards or
|
||||
security context of the file will not be correct after modification
|
||||
"""
|
||||
pattern = re.compile('''
|
||||
pattern = re.compile(r'''
|
||||
(^
|
||||
\s*
|
||||
(?P<option> [^\#;]+?)
|
||||
@@ -1220,7 +1220,7 @@ def inifile_replace_variables(filepath, section, replacevars=dict(), appendvars=
|
||||
One have to run restore_context(filepath) afterwards or
|
||||
security context of the file will not be correct after modification
|
||||
"""
|
||||
pattern = re.compile('''
|
||||
pattern = re.compile(r'''
|
||||
(^
|
||||
\[
|
||||
(?P<section> .+) \]
|
||||
|
||||
Reference in new issue
Block a user