Skip to content
Snippets Groups Projects
Commit 8092ee719afe authored by Laurent Peuch's avatar Laurent Peuch
Browse files

feat: run flynt on the code base to convert everything into f-strings

parent 84fc14d2f9b6
No related branches found
No related tags found
1 merge request!47feat: run flynt on the code base to convert everything into f-strings
Pipeline #195897 passed with warnings
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
def make_from(policy, **kwargs): def make_from(policy, **kwargs):
if not isinstance(policy, JWTAuthenticationPolicy): if not isinstance(policy, JWTAuthenticationPolicy):
pol_type = policy.__class__.__name__ pol_type = policy.__class__.__name__
raise ValueError("Invalid policy type %s" % pol_type) raise ValueError(f"Invalid policy type {pol_type}")
return JWTCookieAuthenticationPolicy( return JWTCookieAuthenticationPolicy(
private_key=policy.private_key, private_key=policy.private_key,
...@@ -266,7 +266,7 @@ ...@@ -266,7 +266,7 @@
callback=policy.callback, callback=policy.callback,
json_encoder=policy.json_encoder, json_encoder=policy.json_encoder,
audience=policy.audience, audience=policy.audience,
**kwargs **kwargs,
) )
def _get_cookies(self, request: Request, value, max_age=None, domains=None): def _get_cookies(self, request: Request, value, max_age=None, domains=None):
......
...@@ -56,9 +56,7 @@ ...@@ -56,9 +56,7 @@
requires = {} requires = {}
for entry in ("__depends__",): # "__recommends__"): for entry in ("__depends__",): # "__recommends__"):
requires.update(__pkginfo__.get(entry, {})) requires.update(__pkginfo__.get(entry, {}))
install_requires = [ install_requires = [f"{d} {v and v or ''}".strip() for d, v in requires.items()]
"{} {}".format(d, v and v or "").strip() for d, v in requires.items()
]
setup( setup(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment