# HG changeset patch # User Laurent Peuch <cortex@worlddomination.be> # Date 1687885073 -7200 # Tue Jun 27 18:57:53 2023 +0200 # Node ID 8092ee719afe5df4b503cdf5246ee97f952119fe # Parent 84fc14d2f9b62197bbeb6e4fd142338918d1adf5 feat: run flynt on the code base to convert everything into f-strings diff --git a/cubicweb_api/auth/jwt_policy.py b/cubicweb_api/auth/jwt_policy.py --- a/cubicweb_api/auth/jwt_policy.py +++ b/cubicweb_api/auth/jwt_policy.py @@ -252,7 +252,7 @@ def make_from(policy, **kwargs): if not isinstance(policy, JWTAuthenticationPolicy): pol_type = policy.__class__.__name__ - raise ValueError("Invalid policy type %s" % pol_type) + raise ValueError(f"Invalid policy type {pol_type}") return JWTCookieAuthenticationPolicy( private_key=policy.private_key, @@ -266,7 +266,7 @@ callback=policy.callback, json_encoder=policy.json_encoder, audience=policy.audience, - **kwargs + **kwargs, ) def _get_cookies(self, request: Request, value, max_age=None, domains=None): diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -56,9 +56,7 @@ requires = {} for entry in ("__depends__",): # "__recommends__"): requires.update(__pkginfo__.get(entry, {})) -install_requires = [ - "{} {}".format(d, v and v or "").strip() for d, v in requires.items() -] +install_requires = [f"{d} {v and v or ''}".strip() for d, v in requires.items()] setup(