Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zerolab committed May 10, 2024
1 parent a10f24e commit 166e78a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion grapple/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def user_settings(self):

def __getattr__(self, attr):
if attr not in self.defaults:
raise AttributeError("Invalid Grapple setting: '%s'" % attr)
raise AttributeError(f"Invalid Grapple setting: '{attr}'")

try:
# Check if present in user settings
Expand Down
17 changes: 7 additions & 10 deletions tests/test_image_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,15 @@ def test_renditions(self):
def test_renditions_with_allowed_image_filters_restrictions(self):
def get_query(**kwargs):
params = ",".join([f"{key}: {value}" for key, value in kwargs.items()])
return (
"""
query ($id: ID!) {
image(id: $id) {
rendition(%s) {
return f"""
query ($id: ID!) {{
image(id: $id) {{
rendition({params}) {{
url
}
}
}
}}
}}
}}
"""
% params
)

results = self.client.execute(
get_query(width=100), variables={"id": self.example_image.id}
Expand Down

0 comments on commit 166e78a

Please sign in to comment.