*: 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):
|
||||
"""Output results human readable"""
|
||||
total_max: int = max([max(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_max: int = max(max(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)
|
||||
|
||||
print(f"Version: {__version__}")
|
||||
print(f"Processes: {len(values)}")
|
||||
|
|
|
@ -28,6 +28,7 @@ ALLOWED_MODELS = (Flow, FlowStageBinding, Stage, Policy, PolicyBinding, Prompt)
|
|||
def transaction_rollback():
|
||||
"""Enters an atomic transaction and always triggers a rollback at the end of the block."""
|
||||
atomic = transaction.atomic()
|
||||
# pylint: disable=unnecessary-dunder-call
|
||||
atomic.__enter__()
|
||||
yield
|
||||
atomic.__exit__(IntegrityError, None, None)
|
||||
|
|
|
@ -52,7 +52,7 @@ class SAMLProvider(Provider):
|
|||
default=SAMLBindings.REDIRECT,
|
||||
verbose_name=_("Service Provider Binding"),
|
||||
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],
|
||||
default="weeks=4",
|
||||
verbose_name="Consent expires in",
|
||||
help_text=_(
|
||||
("Offset after which consent expires. " "(Format: hours=1;minutes=2;seconds=3).")
|
||||
),
|
||||
help_text=_(("Offset after which consent expires. (Format: hours=1;minutes=2;seconds=3).")),
|
||||
)
|
||||
|
||||
@property
|
||||
|
|
|
@ -43,7 +43,7 @@ class FieldTypes(models.TextChoices):
|
|||
# Same as text, but has autocomplete for password managers
|
||||
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.")
|
||||
PASSWORD = (
|
||||
|
|
Reference in New Issue