Skip to content

Commit 7b04444

Browse files
committed
fix: resolve new pylint warnings
- Fix warnings introduced by pylint v3.3.3 upgrade
1 parent cdaa10d commit 7b04444

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

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)