Mercurial > personal > weather-server
comparison weather_server/locations.py @ 35:2f3473416c11
Fix format string in repr(Location).
| author | Paul Fisher <paul@pfish.zone> |
|---|---|
| date | Fri, 02 Jul 2021 20:36:56 -0400 |
| parents | 9bc3687e1e5e |
| children | b77c8e7d2742 |
comparison
equal
deleted
inserted
replaced
| 34:8d3f32455575 | 35:2f3473416c11 |
|---|---|
| 64 return pytz.timezone(self.tz_name) | 64 return pytz.timezone(self.tz_name) |
| 65 except pytz.UnknownTimeZoneError: | 65 except pytz.UnknownTimeZoneError: |
| 66 return pytz.UTC | 66 return pytz.UTC |
| 67 | 67 |
| 68 def __repr__(self) -> str: | 68 def __repr__(self) -> str: |
| 69 return '<Location in %r>'.format(self.root) | 69 return f'<Location in {self.root!r}>' |
| 70 | 70 |
| 71 | 71 |
| 72 class LocationFolder: | 72 class LocationFolder: |
| 73 | 73 |
| 74 def __init__(self, root: pathlib.Path): | 74 def __init__(self, root: pathlib.Path): |
