From fc5becbb3e0c999e77baf01b2be724b66096b201 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Sun, 4 Nov 2018 23:03:03 -0500 Subject: [PATCH 1/4] Upgrade flake8 version to 3.6.0 --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 2ecb7b0efe2..a115f5dccb4 100755 --- a/requirements.txt +++ b/requirements.txt @@ -18,6 +18,6 @@ parameterized==0.6.1 beautifulsoup4>=4.6.0 pyotp>=2.2.6 boto>=2.49.0 -flake8==3.5.0 +flake8==3.6.0 PyVirtualDisplay==0.2.1 -e . diff --git a/setup.py b/setup.py index f2c6c06a750..2e64560d3c5 100755 --- a/setup.py +++ b/setup.py @@ -70,7 +70,7 @@ 'beautifulsoup4>=4.6.0', # Keep at >=4.6.0 while using bs4 'pyotp>=2.2.6', 'boto>=2.49.0', - 'flake8==3.5.0', + 'flake8==3.6.0', 'PyVirtualDisplay==0.2.1', ], packages=[ From 6963c2a39a21b859788618edd9df5d94f48fe1ab Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Sun, 4 Nov 2018 23:08:40 -0500 Subject: [PATCH 2/4] flake8 fixes --- seleniumbase/fixtures/email_manager.py | 2 +- seleniumbase/fixtures/xpath_to_css.py | 38 +++++++++++++------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/seleniumbase/fixtures/email_manager.py b/seleniumbase/fixtures/email_manager.py index 74f0f83a77c..6581775aea6 100755 --- a/seleniumbase/fixtures/email_manager.py +++ b/seleniumbase/fixtures/email_manager.py @@ -478,7 +478,7 @@ def fixup(text): except KeyError: pass return text # leave as is - return re.sub("&#?\w+;", fixup, html) + return re.sub(r"&#?\w+;", fixup, html) def decode_quoted_printable(self, html): """ diff --git a/seleniumbase/fixtures/xpath_to_css.py b/seleniumbase/fixtures/xpath_to_css.py index dd8badffc4c..f57921bb43c 100755 --- a/seleniumbase/fixtures/xpath_to_css.py +++ b/seleniumbase/fixtures/xpath_to_css.py @@ -5,27 +5,27 @@ import re _sub_regexes = { - "tag": "([a-zA-Z][a-zA-Z0-9]{0,10}|\*)", - "attribute": "[.a-zA-Z_:][-\w:.]*(\(\))?)", - "value": "\s*[\w/:][-/\w\s,:;.]*" + "tag": r"([a-zA-Z][a-zA-Z0-9]{0,10}|\*)", + "attribute": r"[.a-zA-Z_:][-\w:.]*(\(\))?)", + "value": r"\s*[\w/:][-/\w\s,:;.]*" } _validation_re = ( - "(?P" - "(" - "^id\([\"\']?(?P%(value)s)[\"\']?\)" - "|" - "(?P