From 67dc61d6cd158dca2d8be16920442ba094dbf424 Mon Sep 17 00:00:00 2001 From: Chris Wagner Date: Wed, 27 Sep 2023 20:19:02 -0700 Subject: [PATCH] Updates for latest. Have to fix py_webauthn until they fix user_handle at 1.9. djlint now finds lots more issues - fix/ignore those. One was the missing tags reported. closes #830 --- .pre-commit-config.yaml | 8 ++++---- docs/_static/openapi_view.html | 8 ++++++-- flask_security/templates/security/_menu.html | 8 ++++---- flask_security/templates/security/base.html | 1 + pyproject.toml | 5 ++++- pytest.ini | 4 +--- requirements/tests.txt | 2 +- 7 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5ee3a7be..63eda190 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,23 +14,23 @@ repos: - id: check-merge-conflict - id: fix-byte-order-marker - repo: https://github.com/asottile/pyupgrade - rev: v3.9.0 + rev: v3.13.0 hooks: - id: pyupgrade args: [--py38-plus] - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 23.9.1 hooks: - id: black - repo: https://github.com/pycqa/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 additional_dependencies: - flake8-bugbear - flake8-implicit-str-concat - repo: https://github.com/Riverside-Healthcare/djLint - rev: v1.32.1 + rev: v1.34.0 hooks: - id: djlint-jinja files: "\\.html" diff --git a/docs/_static/openapi_view.html b/docs/_static/openapi_view.html index 70e29b51..ebbcda4f 100644 --- a/docs/_static/openapi_view.html +++ b/docs/_static/openapi_view.html @@ -1,7 +1,9 @@ - + - + + + API @@ -19,6 +21,8 @@ slot="logo" src="logo-owl-68.png" alt="logo" + width="68" + height="100" /> diff --git a/flask_security/templates/security/_menu.html b/flask_security/templates/security/_menu.html index 819f66db..9f072a0c 100644 --- a/flask_security/templates/security/_menu.html +++ b/flask_security/templates/security/_menu.html @@ -9,22 +9,22 @@

{{ _fsdomain('Menu') }}

{% if security.changeable %}
  • - {{ _fsdomain("Change Password") }} + {{ _fsdomain("Change Password") }}
  • {% endif %} {% if security.two_factor %}
  • - {{ _fsdomain("Two Factor Setup") }} + {{ _fsdomain("Two Factor Setup") }}
  • {% endif %} {% if security.unified_signin %}
  • - {{ _fsdomain("Unified Signin Setup") }} + {{ _fsdomain("Unified Signin Setup") }}
  • {% endif %} {% if security.webauthn %}
  • - {{ _fsdomain("WebAuthn Setup") }} + {{ _fsdomain("WebAuthn Setup") }}
  • {% endif %} {% else %} diff --git a/flask_security/templates/security/base.html b/flask_security/templates/security/base.html index f0fcdd85..32df6ead 100644 --- a/flask_security/templates/security/base.html +++ b/flask_security/templates/security/base.html @@ -1,3 +1,4 @@ +{# djlint:off H030,H031 #} {% block doc -%} diff --git a/pyproject.toml b/pyproject.toml index 95ad0553..0d2a24d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ dependencies = [ babel = ["babel>=2.12.1", "flask_babel>=3.1.0"] fsqla = ["flask_sqlalchemy>=3.0.3", "sqlalchemy>=2.0.12", "sqlalchemy-utils>=0.41.1"] common = ["bcrypt>=4.0.1", "flask_mailman>=0.3.0", "bleach>=6.0.0"] -mfa = ["cryptography>=40.0.2", "qrcode>=7.4.2", "phonenumberslite>=8.13.11", "webauthn>=1.9.0"] +mfa = ["cryptography>=40.0.2", "qrcode>=7.4.2", "phonenumberslite>=8.13.11", "webauthn==1.9.0"] low = [ # Lowest supported versions "Flask==2.3.2", @@ -89,3 +89,6 @@ low = [ [tool.setuptools.dynamic] version = {attr = "flask_security.__version__"} + +[tool.djlint] + ignore="H005,H006" # lang, img height/width diff --git a/pytest.ini b/pytest.ini index 87360cbb..3d70cad5 100644 --- a/pytest.ini +++ b/pytest.ini @@ -22,8 +22,6 @@ filterwarnings = ignore::DeprecationWarning:mongoengine: ignore::DeprecationWarning:flask_login:0 ignore:.*passwordless feature.*:DeprecationWarning:flask_security:0 - ignore:.*passing settings to bcrypt.*:DeprecationWarning:passlib:0 - ignore:.*'crypt' is deprecated.*:DeprecationWarning:passlib:0 - ignore:pkg_resources is deprecated:DeprecationWarning:passlib:0 + ignore::DeprecationWarning:passlib:0 ignore:.*'sms' was enabled in SECURITY_US_ENABLED_METHODS;.*:UserWarning:flask_security:0 ignore:.*'get_token_status' is deprecated.*:DeprecationWarning:flask_security:0 diff --git a/requirements/tests.txt b/requirements/tests.txt index 4d0508b8..fc6246f1 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -29,6 +29,6 @@ qrcode requests sqlalchemy sqlalchemy-utils -webauthn +webauthn==1.9.0 werkzeug zxcvbn