*: fix linting
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
8cf0e78aa0
commit
8cd1a42fb9
|
@ -94,9 +94,9 @@ class Command(BaseCommand): # pragma: no cover
|
||||||
|
|
||||||
def output_overview(self, values):
|
def output_overview(self, values):
|
||||||
"""Output results human readable"""
|
"""Output results human readable"""
|
||||||
total_max: int = max([max(inner) for inner in values])
|
total_max: int = max(max(inner) for inner in values)
|
||||||
total_min: int = min([min(inner) for inner in values])
|
total_min: int = min(min(inner) for inner in values)
|
||||||
total_avg = sum([sum(inner) for inner in values]) / sum([len(inner) for inner in values])
|
total_avg = sum(sum(inner) for inner in values) / sum(len(inner) for inner in values)
|
||||||
|
|
||||||
print(f"Version: {__version__}")
|
print(f"Version: {__version__}")
|
||||||
print(f"Processes: {len(values)}")
|
print(f"Processes: {len(values)}")
|
||||||
|
|
|
@ -28,6 +28,7 @@ ALLOWED_MODELS = (Flow, FlowStageBinding, Stage, Policy, PolicyBinding, Prompt)
|
||||||
def transaction_rollback():
|
def transaction_rollback():
|
||||||
"""Enters an atomic transaction and always triggers a rollback at the end of the block."""
|
"""Enters an atomic transaction and always triggers a rollback at the end of the block."""
|
||||||
atomic = transaction.atomic()
|
atomic = transaction.atomic()
|
||||||
|
# pylint: disable=unnecessary-dunder-call
|
||||||
atomic.__enter__()
|
atomic.__enter__()
|
||||||
yield
|
yield
|
||||||
atomic.__exit__(IntegrityError, None, None)
|
atomic.__exit__(IntegrityError, None, None)
|
||||||
|
|
|
@ -52,7 +52,7 @@ class SAMLProvider(Provider):
|
||||||
default=SAMLBindings.REDIRECT,
|
default=SAMLBindings.REDIRECT,
|
||||||
verbose_name=_("Service Provider Binding"),
|
verbose_name=_("Service Provider Binding"),
|
||||||
help_text=_(
|
help_text=_(
|
||||||
("This determines how authentik sends the " "response back to the Service Provider.")
|
("This determines how authentik sends the response back to the Service Provider.")
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,7 @@ class ConsentStage(Stage):
|
||||||
validators=[timedelta_string_validator],
|
validators=[timedelta_string_validator],
|
||||||
default="weeks=4",
|
default="weeks=4",
|
||||||
verbose_name="Consent expires in",
|
verbose_name="Consent expires in",
|
||||||
help_text=_(
|
help_text=_(("Offset after which consent expires. (Format: hours=1;minutes=2;seconds=3).")),
|
||||||
("Offset after which consent expires. " "(Format: hours=1;minutes=2;seconds=3).")
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
|
@ -43,7 +43,7 @@ class FieldTypes(models.TextChoices):
|
||||||
# Same as text, but has autocomplete for password managers
|
# Same as text, but has autocomplete for password managers
|
||||||
USERNAME = (
|
USERNAME = (
|
||||||
"username",
|
"username",
|
||||||
_(("Username: Same as Text input, but checks for " "and prevents duplicate usernames.")),
|
_(("Username: Same as Text input, but checks for and prevents duplicate usernames.")),
|
||||||
)
|
)
|
||||||
EMAIL = "email", _("Email: Text field with Email type.")
|
EMAIL = "email", _("Email: Text field with Email type.")
|
||||||
PASSWORD = (
|
PASSWORD = (
|
||||||
|
|
Reference in a new issue