Skip to content

Commit ca06e96

Browse files
committed
Ruff
Don't know why it's complaining on modules I didn't touch A005 Module `resource` shadows a Python standard-library module PLC0206 Extracting value from dictionary without calling `.items()` RUF023 `BearerToken.__slots__` is not sorted ignoring as this isn't realted to this pr
1 parent a096dce commit ca06e96

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

oauthlib/oauth2/rfc8628/clients/device.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ def prepare_request_uri(self, uri, scope=None, **kwargs):
4545
if scope:
4646
params.append(('scope', list_to_scope(scope)))
4747

48-
for k in kwargs:
49-
if kwargs[k]:
50-
params.append((str(k), kwargs[k]))
48+
for k,v in kwargs.items():
49+
if v:
50+
params.append((str(k), v))
5151

5252
return add_params_to_uri(uri, params)
5353

oauthlib/oauth2/rfc8628/grant_types/device_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from typing import Callable
55

6-
from oauthlib import common # noqa: TCH001
6+
from oauthlib import common # noqa: TC001
77

88
from oauthlib.oauth2.rfc6749 import errors as rfc6749_errors
99
from oauthlib.oauth2.rfc6749.grant_types.base import GrantTypeBase

ruff.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ max-complexity = 24 # default is 10
9898
"oauthlib/oauth2/rfc6749/endpoints/base.py" = ["BLE001"]
9999
"oauthlib/openid/connect/core/grant_types/base.py" = ["BLE001"]
100100
"tests/*" = ["PT009", "PT027", "S101"]
101+
"oauthlib/oauth1/rfc5849/endpoints/resource.py" = ["A005"]
102+
"oauthlib/oauth2/rfc6749/endpoints/resource.py" = ["A005"]
103+
"oauthlib/oauth2/rfc6749/endpoints/token.py" = ["A005"]
104+
"oauthlib/oauth2/rfc6749/parameters.py" = ["PLC0206"]
105+
"oauthlib/oauth2/rfc6749/tokens.py" = ["RUF023"]
106+
"oauthlib/openid/connect/core/tokens.py" = ["RUF023"]
101107

102108
# [tool.ruff.pylint]
103109
[pylint]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy