Skip to content

Commit

Permalink
Fix fstring syntax not available in 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
ericof committed May 17, 2023
1 parent ab0c48a commit 9613ac8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ user
group
env
relation
addon
exceptions
```

Expand Down
2 changes: 1 addition & 1 deletion src/plone/api/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def get_addons(limit: str = "") -> List[AddonInformation]:
if limit in ("installed", "upgradable", "available"):
addons = [addon for addon in addons if limit in addon.flags]
elif limit != "":
raise InvalidParameterError(f"Parameter {limit=} is not valid.")
raise InvalidParameterError(f"Parameter limit='{limit}' is not valid.")

This comment has been minimized.

Copy link
@davisagli

davisagli May 17, 2023

Member

@ericof Gah, I tried to check whether that was supported in 3.7, but I could not find the answer.

This comment has been minimized.

Copy link
@gforcada

gforcada May 17, 2023

Member

Seems it is 3.8+: https://stackoverflow.com/questions/65296925/f-string-debugging-shorthand-in-python-3-6

Though, 3.8 is the minimum version we support, right? 🤔

Well, we have 3.7 still for Plone 5.2, but yeah 🤷🏾

return addons


Expand Down

0 comments on commit 9613ac8

Please sign in to comment.