Skip to content

Commit

Permalink
Fix quotes in f-strings for older versions of Python
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Oct 24, 2024
1 parent 9228a42 commit aa80901
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions weasyprint/pdf/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def set_font_size(self, font, size):
super().set_font_size(font, size)

def set_state(self, state):
key = f's{len(self._resources['ExtGState'])}'
key = f's{len(self._resources["ExtGState"])}'
self._resources['ExtGState'][key] = state
super().set_state(key)

Expand Down Expand Up @@ -187,7 +187,7 @@ def add_group(self, x, y, width, height):
}),
})
group = self.clone(resources=resources, extra=extra)
group.id = f'x{len(self._resources['XObject'])}'
group.id = f'x{len(self._resources["XObject"])}'
self._resources['XObject'][group.id] = group
return group

Expand Down Expand Up @@ -228,7 +228,7 @@ def add_pattern(self, x, y, width, height, repeat_width, repeat_height, matrix):
'Resources': resources,
})
pattern = self.clone(resources=resources, extra=extra)
pattern.id = f'p{len(self._resources['Pattern'])}'
pattern.id = f'p{len(self._resources["Pattern"])}'
self._resources['Pattern'][pattern.id] = pattern
return pattern

Expand All @@ -243,7 +243,7 @@ def add_shading(self, shading_type, color_space, domain, coords, extend,
})
if extend:
shading['Extend'] = pydyf.Array((b'true', b'true'))
shading.id = f's{len(self._resources['Shading'])}'
shading.id = f's{len(self._resources["Shading"])}'
self._resources['Shading'][shading.id] = shading
return shading

Expand Down

0 comments on commit aa80901

Please sign in to comment.