Skip to content

Commit

Permalink
New year, new Black (#1068)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwag956 authored Jan 29, 2025
1 parent b8fb7b1 commit 9467de6
Show file tree
Hide file tree
Showing 62 changed files with 403 additions and 403 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/psf/black
rev: 24.10.0
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
Expand Down
14 changes: 7 additions & 7 deletions flask_security/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""
flask_security
~~~~~~~~~~~~~~
flask_security
~~~~~~~~~~~~~~
Flask-Security is a Flask extension that aims to add comprehensive security
to Flask applications.
Flask-Security is a Flask extension that aims to add comprehensive security
to Flask applications.
:copyright: (c) 2012-2019 by Matt Wright.
:copyright: (c) 2019-2025 by J. Christopher Wagner.
:license: MIT, see LICENSE for more details.
:copyright: (c) 2012-2019 by Matt Wright.
:copyright: (c) 2019-2025 by J. Christopher Wagner.
:license: MIT, see LICENSE for more details.
"""

# flake8: noqa: F401
Expand Down
14 changes: 7 additions & 7 deletions flask_security/babel.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"""
flask_security.babel
~~~~~~~~~~~~~~~~~~~~
flask_security.babel
~~~~~~~~~~~~~~~~~~~~
I18N support for Flask-Security.
I18N support for Flask-Security.
:copyright: (c) 2019-2023 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
:copyright: (c) 2019-2023 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
As of Flask-Babel 2.0.0 - it supports the Flask-BabelEx Domain extension - and it
is maintained. If that isn't installed fall back to a Null Domain
As of Flask-Babel 2.0.0 - it supports the Flask-BabelEx Domain extension - and it
is maintained. If that isn't installed fall back to a Null Domain
"""

# flake8: noqa: F811
Expand Down
20 changes: 10 additions & 10 deletions flask_security/change_email.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
"""
flask_security.change_email
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flask_security.change_email
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Flask-Security Change Email module
Flask-Security Change Email module
:copyright: (c) 2024-2024 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
:copyright: (c) 2024-2024 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
Allow user to change their email address.
If CHANGE_EMAIL_CONFIRM is set then the user will receive an email
at the new email address with a token that can be used to verify and change
emails. Upon success - if CHANGE_EMAIL_NOTIFY_OLD is set, an email will be sent
to the old email address.
Allow user to change their email address.
If CHANGE_EMAIL_CONFIRM is set then the user will receive an email
at the new email address with a token that can be used to verify and change
emails. Upon success - if CHANGE_EMAIL_NOTIFY_OLD is set, an email will be sent
to the old email address.
"""

from __future__ import annotations
Expand Down
34 changes: 17 additions & 17 deletions flask_security/change_username.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
"""
flask_security.change_username
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flask_security.change_username
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Flask-Security Change Username module
Flask-Security Change Username module
:copyright: (c) 2025-2025 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
:copyright: (c) 2025-2025 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
Allow user to change their username.
This is really just for when username is used as an authenticating
identity (and therefore has to be unique).
Allow user to change their username.
This is really just for when username is used as an authenticating
identity (and therefore has to be unique).
The basic feature allows an authenticated user to change their username
to any available username. Normalization and validation take place
using username_util.
This doesn't offer any defense against username enumeration by another user or
preventing a user from constantly changing their username. Applications
could use the UsernameUtil.check_username() method to implement this.
The basic feature allows an authenticated user to change their username
to any available username. Normalization and validation take place
using username_util.
This doesn't offer any defense against username enumeration by another user or
preventing a user from constantly changing their username. Applications
could use the UsernameUtil.check_username() method to implement this.
Think about: username is normally considered 'public' however as an identity
should we follow a change protocol more like email - require a confirmation from
the registered email.
Think about: username is normally considered 'public' however as an identity
should we follow a change protocol more like email - require a confirmation from
the registered email.
"""

Expand Down
14 changes: 7 additions & 7 deletions flask_security/changeable.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""
flask_security.changeable
~~~~~~~~~~~~~~~~~~~~~~~~~
flask_security.changeable
~~~~~~~~~~~~~~~~~~~~~~~~~
Flask-Security change password module
Flask-Security change password module
:copyright: (c) 2012 by Matt Wright.
:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag).
:author: Eskil Heyn Olsen
:license: MIT, see LICENSE for more details.
:copyright: (c) 2012 by Matt Wright.
:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag).
:author: Eskil Heyn Olsen
:license: MIT, see LICENSE for more details.
"""

from __future__ import annotations
Expand Down
12 changes: 6 additions & 6 deletions flask_security/cli.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""
flask_security.cli
~~~~~~~~~~~~~~~~~~
flask_security.cli
~~~~~~~~~~~~~~~~~~
Command Line Interface for managing accounts and roles.
Command Line Interface for managing accounts and roles.
:copyright: (c) 2016 by CERN.
:copyright: (c) 2019-2024 by J. Christopher Wagner
:license: MIT, see LICENSE for more details.
:copyright: (c) 2016 by CERN.
:copyright: (c) 2019-2024 by J. Christopher Wagner
:license: MIT, see LICENSE for more details.
"""

import functools
Expand Down
14 changes: 7 additions & 7 deletions flask_security/confirmable.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""
flask_security.confirmable
~~~~~~~~~~~~~~~~~~~~~~~~~~
flask_security.confirmable
~~~~~~~~~~~~~~~~~~~~~~~~~~
Flask-Security confirmable module
Flask-Security confirmable module
:copyright: (c) 2012 by Matt Wright.
:copyright: (c) 2017 by CERN.
:copyright: (c) 2021-2023 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
:copyright: (c) 2012 by Matt Wright.
:copyright: (c) 2017 by CERN.
:copyright: (c) 2021-2023 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
"""

from flask import current_app
Expand Down
16 changes: 8 additions & 8 deletions flask_security/core.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"""
flask_security.core
~~~~~~~~~~~~~~~~~~~
flask_security.core
~~~~~~~~~~~~~~~~~~~
Flask-Security core module
Flask-Security core module
:copyright: (c) 2012 by Matt Wright.
:copyright: (c) 2017 by CERN.
:copyright: (c) 2017 by ETH Zurich, Swiss Data Science Center.
:copyright: (c) 2019-2025 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
:copyright: (c) 2012 by Matt Wright.
:copyright: (c) 2017 by CERN.
:copyright: (c) 2017 by ETH Zurich, Swiss Data Science Center.
:copyright: (c) 2019-2025 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
"""

from __future__ import annotations
Expand Down
12 changes: 6 additions & 6 deletions flask_security/datastore.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""
flask_security.datastore
~~~~~~~~~~~~~~~~~~~~~~~~
flask_security.datastore
~~~~~~~~~~~~~~~~~~~~~~~~
This module contains an user datastore classes.
This module contains an user datastore classes.
:copyright: (c) 2012 by Matt Wright.
:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
:copyright: (c) 2012 by Matt Wright.
:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
"""

from __future__ import annotations
Expand Down
12 changes: 6 additions & 6 deletions flask_security/decorators.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""
flask_security.decorators
~~~~~~~~~~~~~~~~~~~~~~~~~
flask_security.decorators
~~~~~~~~~~~~~~~~~~~~~~~~~
Flask-Security decorators module
Flask-Security decorators module
:copyright: (c) 2012-2019 by Matt Wright.
:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
:copyright: (c) 2012-2019 by Matt Wright.
:copyright: (c) 2019-2024 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
"""

from __future__ import annotations
Expand Down
14 changes: 7 additions & 7 deletions flask_security/forms.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""
flask_security.forms
~~~~~~~~~~~~~~~~~~~~
flask_security.forms
~~~~~~~~~~~~~~~~~~~~
Flask-Security forms module
Flask-Security forms module
:copyright: (c) 2012 by Matt Wright.
:copyright: (c) 2017 by CERN.
:copyright: (c) 2019-2025 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
:copyright: (c) 2012 by Matt Wright.
:copyright: (c) 2017 by CERN.
:copyright: (c) 2019-2025 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
"""

from __future__ import annotations
Expand Down
8 changes: 4 additions & 4 deletions flask_security/json.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""
Flask-Security JSON extensions.
Flask-Security JSON extensions.
:copyright: (c) 2022-2024 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
:copyright: (c) 2022-2024 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
Pieces of this code liberally copied from flask-mongoengine.
Pieces of this code liberally copied from flask-mongoengine.
"""


Expand Down
14 changes: 7 additions & 7 deletions flask_security/mail_util.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"""
flask_security.mail_util
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flask_security.mail_util
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utility class providing methods for validating, normalizing and sending emails.
Utility class providing methods for validating, normalizing and sending emails.
:copyright: (c) 2020-2024 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
:copyright: (c) 2020-2024 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
While this default implementation uses Flask-Mailman - we want to make sure that
Flask-Mailman isn't REQUIRED (if this implementation isn't used).
While this default implementation uses Flask-Mailman - we want to make sure that
Flask-Mailman isn't REQUIRED (if this implementation isn't used).
"""

from __future__ import annotations
Expand Down
2 changes: 1 addition & 1 deletion flask_security/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""""
"""
Copyright 2019 by J. Christopher Wagner (jwag). All rights reserved.
:license: MIT, see LICENSE for more details.
Expand Down
10 changes: 5 additions & 5 deletions flask_security/oauth_glue.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""
flask_security.oauth_glue
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flask_security.oauth_glue
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Class and methods to glue our login path with authlib for to support 'social' auth.
Class and methods to glue our login path with authlib for to support 'social' auth.
:copyright: (c) 2022-2024 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
:copyright: (c) 2022-2024 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
"""

Expand Down
12 changes: 6 additions & 6 deletions flask_security/oauth_provider.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""
flask_security.oauth_provider
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flask_security.oauth_provider
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Class and methods to create providers for oauth_glue.
Example providers for github and google.
Class and methods to create providers for oauth_glue.
Example providers for github and google.
:copyright: (c) 2024-2024 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
:copyright: (c) 2024-2024 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
"""

Expand Down
10 changes: 5 additions & 5 deletions flask_security/password_util.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""
flask_security.password_util
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flask_security.password_util
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utility class providing methods for validating and normalizing passwords.
Utility class providing methods for validating and normalizing passwords.
:copyright: (c) 2020-2024 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
:copyright: (c) 2020-2024 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
"""

Expand Down
12 changes: 6 additions & 6 deletions flask_security/passwordless.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""
flask_security.passwordless
~~~~~~~~~~~~~~~~~~~~~~~~~~~
flask_security.passwordless
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Flask-Security passwordless module
Flask-Security passwordless module
:copyright: (c) 2012 by Matt Wright.
:copyright: (c) 2021 by Chris Wagner.
:license: MIT, see LICENSE for more details.
:copyright: (c) 2012 by Matt Wright.
:copyright: (c) 2021 by Chris Wagner.
:license: MIT, see LICENSE for more details.
"""

from flask import current_app as app
Expand Down
Loading

0 comments on commit 9467de6

Please sign in to comment.