Skip to content

Commit

Permalink
Switch to 2024 black style (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin committed Feb 15, 2024
1 parent 756f78b commit 859d0ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions elastic_enterprise_search/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ def resolve_auth_headers(
if isinstance(basic_auth, str):
headers["authorization"] = f"Basic {basic_auth}"
elif isinstance(basic_auth, (list, tuple)):
headers[
"authorization"
] = f"Basic {base64.b64encode(':'.join(basic_auth).encode('utf-8')).decode('ascii')}"
headers["authorization"] = (
f"Basic {base64.b64encode(':'.join(basic_auth).encode('utf-8')).decode('ascii')}"
)
elif basic_auth is None:
headers["authorization"] = None
elif basic_auth is not DEFAULT:
Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

@nox.session(python="3.12")
def format(session):
session.install("black", "isort", "flynt", "unasync")
session.install("black~=24.0", "isort", "flynt", "unasync", "setuptools")

session.run("python", "utils/run-unasync.py")
session.run("isort", "--profile=black", *SOURCE_FILES)
Expand All @@ -46,7 +46,7 @@ def format(session):

@nox.session(python="3.12")
def lint(session):
session.install("flake8", "black", "isort")
session.install("flake8", "black~=24.0", "isort")
session.run("black", "--check", "--target-version=py36", *SOURCE_FILES)
session.run("isort", "--check", *SOURCE_FILES)
session.run("flake8", "--ignore=E501,W503,E203", *SOURCE_FILES)
Expand Down

0 comments on commit 859d0ed

Please sign in to comment.