Skip to content

Commit

Permalink
More string formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
urschrei committed Dec 28, 2024
1 parent ad2baf8 commit 8e3d550
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyzotero/zotero.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def wrapped_f(self, *args, **kwargs):
# now split up the URL
result = urlparse(r.url)
# construct cache key
cachekey = result.path + "_" + result.query
cachekey = f"{result.path}_{result.query}"
if self.templates.get(cachekey) and not self._updated(
query_string, self.templates[cachekey], cachekey
):
Expand Down Expand Up @@ -984,7 +984,7 @@ def _tags_data(self, retrieved):
def item_template(self, itemtype, linkmode=None):
"""Get a template for a new item"""
# if we have a template and it hasn't been updated since we stored it
template_name = "{}_{}_{}".format(*["item_template", itemtype, linkmode or ""])
template_name = f"item_template_{itemtype}_{linkmode or ''}"
query_string = f"/items/new?itemType={itemtype}"
if self.templates.get(template_name) and not self._updated(
query_string, self.templates[template_name], template_name
Expand Down

0 comments on commit 8e3d550

Please sign in to comment.