diff --git a/.gitignore b/.gitignore index 208f32a5..116a03ff 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ clean.sh .pylintrc .pytest_cache .python-version +.pre-commit-config.yaml dist _build .tags diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f757dab4..c35c4f9c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,6 +23,7 @@ test:format: stage: test image: python:3.8 script: + - pip install black - black --check . tags: - lint diff --git a/README.rst b/README.rst index 0adb2681..7ac998d5 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ Burp-UI ======= -.. image:: https://git.ziirish.me/ziirish/burp-ui/badges/master/build.svg +.. image:: https://git.ziirish.me/ziirish/burp-ui/badges/master/pipeline.svg :target: https://git.ziirish.me/ziirish/burp-ui/pipelines :alt: Build Status diff --git a/burpui/extensions.py b/burpui/extensions.py index d797cf64..46883867 100644 --- a/burpui/extensions.py +++ b/burpui/extensions.py @@ -16,9 +16,9 @@ from ._compat import to_unicode def parse_db_setting(string): parts = re.search( - "(?:(?P\w+)(?:\+(?P\w+))?://)?" - "(?:(?P\w+)(?::?(?P.+))?@)?" - "(?P[\w_.-]+):?(?P\d+)?(?:/(?P\w+))?", + r"(?:(?P\w+)(?:\+(?P\w+))?://)?" + r"(?:(?P\w+)(?::?(?P.+))?@)?" + r"(?P[\w_.-]+):?(?P\d+)?(?:/(?P\w+))?", string, ) if not parts: # pragma: no cover diff --git a/tox.ini b/tox.ini index e0de3728..316c4358 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ commands = flake8 [flake8] exclude = .tox,docs,migrations,.git,docker,pkgs -extend-ignore = E203 -max-line-length = 88 +extend-ignore = E203,E722,E402,E501 +max-line-length = 120 show-source = true application-import-names = burpui