Skip to content

Commit 89731eb

Browse files
authored
Merge pull request #755 from nasudadada/fix-pre-commit
Fix: Upgrade pre-commit dependencies to resolve CI failures
2 parents 7229004 + 7b04444 commit 89731eb

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v3.4.0
5+
rev: v5.0.0
66
hooks:
77
- id: end-of-file-fixer
88
- id: trailing-whitespace
99
- repo: https://github.com/psf/black
10-
rev: 22.3.0
10+
rev: 24.10.0
1111
hooks:
1212
- id: black
1313
- repo: https://github.com/PyCQA/pylint
14-
rev: v2.15.8
14+
rev: v3.3.3
1515
hooks:
1616
- id: pylint

scripts/shopify_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def add(cls, connection):
128128
if os.path.exists(filename):
129129
raise ConfigFileError("There is already a config file at " + filename)
130130
else:
131-
config = dict(protocol="https")
131+
config = {"protocol": "https"}
132132
domain = input("Domain? (leave blank for %s.myshopify.com) " % (connection))
133133
if not domain.strip():
134134
domain = "%s.myshopify.com" % (connection)

shopify/api_access.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ class ApiAccessError(Exception):
1414

1515

1616
class ApiAccess:
17-
1817
SCOPE_DELIMITER = ","
1918
SCOPE_RE = re.compile(r"\A(?P<unauthenticated>unauthenticated_)?(write|read)_(?P<resource>.*)\Z")
2019
IMPLIED_SCOPE_RE = re.compile(r"\A(?P<unauthenticated>unauthenticated_)?write_(?P<resource>.*)\Z")

shopify/mixins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def add_metafield(self, metafield):
2424
if self.is_new():
2525
raise ValueError("You can only add metafields to a resource that has been saved")
2626

27-
metafield._prefix_options = dict(resource=self.__class__.plural, resource_id=self.id)
27+
metafield._prefix_options = {"resource": self.__class__.plural, "resource_id": self.id}
2828
metafield.save()
2929
return metafield
3030

shopify/session.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self, shop_url, version=None, token=None, access_scopes=None):
5454
return
5555

5656
def create_permission_url(self, scope, redirect_uri, state=None):
57-
query_params = dict(client_id=self.api_key, scope=",".join(scope), redirect_uri=redirect_uri)
57+
query_params = {"client_id": self.api_key, "scope": ",".join(scope), "redirect_uri": redirect_uri}
5858
if state:
5959
query_params["state"] = state
6060
return "https://%s/admin/oauth/authorize?%s" % (self.url, urllib.parse.urlencode(query_params))
@@ -69,7 +69,7 @@ def request_token(self, params):
6969
code = params["code"]
7070

7171
url = "https://%s/admin/oauth/access_token?" % self.url
72-
query_params = dict(client_id=self.api_key, client_secret=self.secret, code=code)
72+
query_params = {"client_id": self.api_key, "client_secret": self.secret, "code": code}
7373
request = urllib.request.Request(url, urllib.parse.urlencode(query_params).encode("utf-8"))
7474
response = urllib.request.urlopen(request)
7575

0 commit comments

Comments
 (0)