Skip to content

Commit 6e19edf

Browse files
committed
chore(deps): update ruff to 0.9.0
1 parent e093a9a commit 6e19edf

File tree

15 files changed

+26
-35
lines changed

15 files changed

+26
-35
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
- id: mixed-line-ending
1111
args: [--fix=lf]
1212
- repo: https://github.com/astral-sh/ruff-pre-commit
13-
rev: v0.8.6
13+
rev: v0.9.0
1414
hooks:
1515
- id: ruff
1616
args: [--fix, --exit-non-zero-on-fix]

social_core/backends/email.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# noqa: A005
12
"""
23
Legacy Email backend, docs at:
34
https://python-social-auth.readthedocs.io/en/latest/backends/email.html

social_core/backends/facebook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def do_auth(self, access_token, response=None, *args, **kwargs):
146146
# account on further logins), this app cannot allow it to
147147
# continue with the auth process.
148148
raise AuthUnknownError(
149-
self, "An error occurred while retrieving " "users Facebook data"
149+
self, "An error occurred while retrieving users Facebook data"
150150
)
151151

152152
data["access_token"] = access_token

social_core/backends/saml.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ def __init__(self, name, **kwargs):
3434
self.name = name
3535
# name should be a slug and must not contain a colon, which
3636
# could conflict with uid prefixing:
37-
assert (
38-
":" not in self.name and " " not in self.name
39-
), 'IdP "name" should be a slug (short, no spaces)'
37+
assert ":" not in self.name and " " not in self.name, (
38+
'IdP "name" should be a slug (short, no spaces)'
39+
)
4040
self.conf = kwargs
4141

4242
def get_user_permanent_id(self, attributes):

social_core/backends/vk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def auth_complete(self, *args, **kwargs):
151151
"_".join([key, self.data.get("viewer_id"), secret]).encode("utf-8")
152152
).hexdigest()
153153
if check_key != auth_key:
154-
raise ValueError("VK.com authentication failed: invalid " "auth key")
154+
raise ValueError("VK.com authentication failed: invalid auth key")
155155

156156
user_check = self.setting("USERMODE")
157157
user_id = self.data.get("viewer_id")

social_core/strategy.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ def render_string(self, html, context):
2929

3030

3131
class BaseStrategy:
32-
ALLOWED_CHARS = (
33-
"abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789"
34-
)
32+
ALLOWED_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
3533
DEFAULT_TEMPLATE_STRATEGY = BaseTemplateStrategy
3634

3735
def __init__(self, storage=None, tpl=None):

social_core/tests/backends/oauth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def do_start(self):
8888

8989
class OAuth1Test(BaseOAuthTest):
9090
request_token_body = None
91-
raw_complete_url = "/complete/{0}/?oauth_verifier=bazqux&" "oauth_token=foobar"
91+
raw_complete_url = "/complete/{0}/?oauth_verifier=bazqux&oauth_token=foobar"
9292

9393
def request_token_handler(self):
9494
HTTPretty.register_uri(

social_core/tests/backends/test_behance.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,15 @@ class BehanceOAuth2Test(OAuth2Test, BaseAuthUrlTestMixin):
2222
"state": "",
2323
"fields": ["Programming", "Web Design", "Web Development"],
2424
"images": {
25-
"32": "https://www.behance.net/assets/img/profile/"
26-
"no-image-32.jpg",
27-
"50": "https://www.behance.net/assets/img/profile/"
28-
"no-image-50.jpg",
25+
"32": "https://www.behance.net/assets/img/profile/no-image-32.jpg",
26+
"50": "https://www.behance.net/assets/img/profile/no-image-50.jpg",
2927
"115": "https://www.behance.net/assets/img/profile/"
3028
"no-image-138.jpg",
3129
"129": "https://www.behance.net/assets/img/profile/"
3230
"no-image-138.jpg",
3331
"138": "https://www.behance.net/assets/img/profile/"
3432
"no-image-138.jpg",
35-
"78": "https://www.behance.net/assets/img/profile/"
36-
"no-image-78.jpg",
33+
"78": "https://www.behance.net/assets/img/profile/no-image-78.jpg",
3734
},
3835
"id": 1010101,
3936
"occupation": "Software Developer",

social_core/tests/backends/test_disqus.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ class DisqusOAuth2Test(OAuth2Test, BaseAuthUrlTestMixin):
2828
"reputation": 1.231755,
2929
"avatar": {
3030
"small": {
31-
"permalink": "https://disqus.com/api/users/avatars/"
32-
"foobar.jpg",
31+
"permalink": "https://disqus.com/api/users/avatars/foobar.jpg",
3332
"cache": "https://securecdn.disqus.com/uploads/"
3433
"users/453/4556/avatar32.jpg?1285535379",
3534
},
@@ -38,8 +37,7 @@ class DisqusOAuth2Test(OAuth2Test, BaseAuthUrlTestMixin):
3837
"cache": "https://securecdn.disqus.com/uploads/users/453/"
3938
"4556/avatar92.jpg?1285535379",
4039
"large": {
41-
"permalink": "https://disqus.com/api/users/avatars/"
42-
"foobar.jpg",
40+
"permalink": "https://disqus.com/api/users/avatars/foobar.jpg",
4341
"cache": "https://securecdn.disqus.com/uploads/users/"
4442
"453/4556/avatar92.jpg?1285535379",
4543
},

social_core/tests/backends/test_foursquare.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ class FoursquareOAuth2Test(OAuth2Test, BaseAuthUrlTestMixin):
1919
},
2020
"response": {
2121
"user": {
22-
"photo": "https://is0.4sqi.net/userpix_thumbs/"
23-
"BYKIT01VN4T4BISN.jpg",
22+
"photo": "https://is0.4sqi.net/userpix_thumbs/BYKIT01VN4T4BISN.jpg",
2423
"pings": False,
2524
"homeCity": "Foo, Bar",
2625
"id": "1010101",

0 commit comments

Comments
 (0)