zope.i18n 5.1__py3-none-any.whl → 5.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
zope/i18n/format.py CHANGED
@@ -185,7 +185,7 @@ class DateTimeFormat:
185
185
  datetime.datetime.combine(
186
186
  datetime.date.today(),
187
187
  datetime.time(*[e or 0 for e in ordered[3:]]))
188
- ).timetz()
188
+ ).timetz()
189
189
  return datetime.time(
190
190
  *[e or 0 for e in ordered[3:]], **{'tzinfo': tzinfo}
191
191
  )
@@ -612,7 +612,7 @@ def buildDateTimeParseInfo(calendar, pattern):
612
612
 
613
613
  # am/pm marker (Text)
614
614
  for entry in _findFormattingCharacterInPattern('a', pattern):
615
- info[entry] = r'({}|{})'.format(calendar.am, calendar.pm)
615
+ info[entry] = fr'({calendar.am}|{calendar.pm})'
616
616
 
617
617
  # era designator (Text)
618
618
  # TODO: works for gregorian only right now
@@ -30,11 +30,11 @@ class TestMessageCatalog:
30
30
  def queryMessage(self, msgid, default=None):
31
31
  default = getattr(msgid, 'default', default)
32
32
  if default is not None and default != msgid:
33
- msg = "{} ({})".format(msgid, default)
33
+ msg = f"{msgid} ({default})"
34
34
  else:
35
35
  msg = msgid
36
36
 
37
- return "[[{}][{}]]".format(self.domain, msg)
37
+ return f"[[{self.domain}][{msg}]]"
38
38
 
39
39
  getMessage = queryMessage
40
40