Skip to content

Commit

Permalink
Reenable black in pre-commit (Netflix#9307)
Browse files Browse the repository at this point in the history
* Reenable black in pre-commit

* upgrade black

* apply black findings
  • Loading branch information
patricksanders authored Mar 31, 2022
1 parent 7715640 commit fcdc9d4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ repos:
pass_filenames: true
args: ["--profile", "black"]

# - repo: https://github.com/ambv/black
# rev: 20.8b1
# hooks:
# - id: black
# language_version: python3.8
- repo: https://github.com/ambv/black
rev: 22.3.0
hooks:
- id: black
language_version: python3.8

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.7.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


class RoleTagAuthorizationMappingGenerator(CredentialAuthzMappingGenerator):
""" Generates an authorization mapping of groups -> roles based on IAM role tags."""
"""Generates an authorization mapping of groups -> roles based on IAM role tags."""

async def generate_credential_authorization_mapping(
self, authorization_mapping: Dict[user_or_group, RoleAuthorizations]
Expand Down
2 changes: 1 addition & 1 deletion consoleme/lib/password.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async def wait_after_authentication_failure(user) -> str:
num_password_failures = 0
num_password_failures = int(num_password_failures) # Redis values are strings
red.setex(redis_key, redix_key_expiration, num_password_failures + 1)
await asyncio.sleep(num_password_failures ** 2)
await asyncio.sleep(num_password_failures**2)
next_delay = (num_password_failures + 1) ** 2
return (
f"Your next authentication failure will result in a {next_delay} second wait. "
Expand Down

0 comments on commit fcdc9d4

Please sign in to comment.