diff --git a/LICENSE b/LICENSE index 4659f8b..bde9e53 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016-2020 Florian Pigorsch & Contributors +Copyright (c) 2016-2021 Florian Pigorsch & Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 867343a..61e2035 100644 --- a/README.md +++ b/README.md @@ -229,6 +229,6 @@ E.g. use [Poedit](https://poedit.net/) or [Localise Online Editor](https://local `msgfmt gpxposter.po -o gpxposter.mo` ## License -[MIT](https://github.com/flopp/GpxTrackPoster/blob/master/LICENSE) © 2016-2020 Florian Pigorsch +[MIT](https://github.com/flopp/GpxTrackPoster/blob/master/LICENSE) © 2016-2021 Florian Pigorsch [strava-activity-type]: https://developers.strava.com/docs/reference/#api-models-ActivityType diff --git a/gpxtrackposter/calendar_drawer.py b/gpxtrackposter/calendar_drawer.py index 08b360b..ac28832 100644 --- a/gpxtrackposter/calendar_drawer.py +++ b/gpxtrackposter/calendar_drawer.py @@ -1,5 +1,5 @@ """Draw a calendar poster.""" -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/circular_drawer.py b/gpxtrackposter/circular_drawer.py index 65234b2..3693fa9 100644 --- a/gpxtrackposter/circular_drawer.py +++ b/gpxtrackposter/circular_drawer.py @@ -1,5 +1,5 @@ """Draw a circular Poster.""" -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/cli.py b/gpxtrackposter/cli.py index 743d217..4243cd3 100755 --- a/gpxtrackposter/cli.py +++ b/gpxtrackposter/cli.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/exceptions.py b/gpxtrackposter/exceptions.py index 7a70183..304ca1c 100644 --- a/gpxtrackposter/exceptions.py +++ b/gpxtrackposter/exceptions.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/github_drawer.py b/gpxtrackposter/github_drawer.py index 828201f..0e2e3d2 100644 --- a/gpxtrackposter/github_drawer.py +++ b/gpxtrackposter/github_drawer.py @@ -1,4 +1,4 @@ -# Copyright 2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2020-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/grid_drawer.py b/gpxtrackposter/grid_drawer.py index 07b0fc8..f9ac8b3 100644 --- a/gpxtrackposter/grid_drawer.py +++ b/gpxtrackposter/grid_drawer.py @@ -1,5 +1,5 @@ """Draw a grid poster.""" -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/heatmap_drawer.py b/gpxtrackposter/heatmap_drawer.py index d556d62..205823f 100644 --- a/gpxtrackposter/heatmap_drawer.py +++ b/gpxtrackposter/heatmap_drawer.py @@ -1,5 +1,5 @@ """Draw a heatmap poster.""" -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/localization.py b/gpxtrackposter/localization.py index 60a20a8..676ab32 100644 --- a/gpxtrackposter/localization.py +++ b/gpxtrackposter/localization.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/poster.py b/gpxtrackposter/poster.py index e2dab68..1c1a4bf 100644 --- a/gpxtrackposter/poster.py +++ b/gpxtrackposter/poster.py @@ -1,5 +1,5 @@ """Create a poster from track data.""" -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/quantity_range.py b/gpxtrackposter/quantity_range.py index cb400bd..e1d1c1f 100644 --- a/gpxtrackposter/quantity_range.py +++ b/gpxtrackposter/quantity_range.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/timezone_adjuster.py b/gpxtrackposter/timezone_adjuster.py index a3eb67e..9dde750 100644 --- a/gpxtrackposter/timezone_adjuster.py +++ b/gpxtrackposter/timezone_adjuster.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. @@ -24,9 +24,8 @@ def adjust(cls, time: datetime.datetime, latlng: s2sphere.LatLng) -> datetime.da if time.utcoffset(): return time assert cls._timezonefinder - tz_name = cls._timezonefinder.timezone_at(lat=latlng.lat().degrees, lng=latlng.lng().degrees) - if tz_name is None: - return time + # if tz_name name is None set it to UTC + tz_name = cls._timezonefinder.timezone_at(lat=latlng.lat().degrees, lng=latlng.lng().degrees) or "UTC" tz = pytz.timezone(tz_name) tz_time = time.astimezone(tz) return tz_time diff --git a/gpxtrackposter/track.py b/gpxtrackposter/track.py index 6404941..85ff0a4 100644 --- a/gpxtrackposter/track.py +++ b/gpxtrackposter/track.py @@ -1,5 +1,5 @@ """Create and maintain info about a given activity track (corresponding to one GPX file).""" -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/track_loader.py b/gpxtrackposter/track_loader.py index dbd4caa..da8da94 100644 --- a/gpxtrackposter/track_loader.py +++ b/gpxtrackposter/track_loader.py @@ -1,7 +1,7 @@ """Handle parsing of GPX files and writing/loading of cached data""" -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/tracks_drawer.py b/gpxtrackposter/tracks_drawer.py index ac1bfbc..c93e9af 100644 --- a/gpxtrackposter/tracks_drawer.py +++ b/gpxtrackposter/tracks_drawer.py @@ -1,5 +1,5 @@ """Contains the base class TracksDrawer, which other Drawers inherit from.""" -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/units.py b/gpxtrackposter/units.py index c48a91f..1b5b520 100644 --- a/gpxtrackposter/units.py +++ b/gpxtrackposter/units.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/utils.py b/gpxtrackposter/utils.py index 1bc1074..7d1b606 100644 --- a/gpxtrackposter/utils.py +++ b/gpxtrackposter/utils.py @@ -1,5 +1,5 @@ """Assorted utility methods for use in creating posters.""" -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/value_range.py b/gpxtrackposter/value_range.py index 4f01b81..077b6dd 100644 --- a/gpxtrackposter/value_range.py +++ b/gpxtrackposter/value_range.py @@ -1,5 +1,5 @@ """Represent a range of numerical values""" -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/xy.py b/gpxtrackposter/xy.py index e3d418c..9712fce 100644 --- a/gpxtrackposter/xy.py +++ b/gpxtrackposter/xy.py @@ -1,5 +1,5 @@ """Represent x,y coords with properly overloaded operations.""" -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/gpxtrackposter/year_range.py b/gpxtrackposter/year_range.py index fca3394..fd7c602 100644 --- a/gpxtrackposter/year_range.py +++ b/gpxtrackposter/year_range.py @@ -1,5 +1,5 @@ """Represent a range of years, with ability to update based on a track""" -# Copyright 2016-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/scripts/bump_year.py b/scripts/bump_year.py index ab809a9..284e542 100755 --- a/scripts/bump_year.py +++ b/scripts/bump_year.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2018-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2018-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/scripts/check_copyright.py b/scripts/check_copyright.py index d605eab..1c7e1e4 100755 --- a/scripts/check_copyright.py +++ b/scripts/check_copyright.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2018-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2018-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. @@ -40,7 +40,7 @@ def has_valid_copyright(file_name: str) -> bool: return ok -if not all([has_valid_copyright(file_name) for file_name in sys.argv]): +if not all(has_valid_copyright(file_name) for file_name in sys.argv): sys.exit(1) sys.exit(0) diff --git a/scripts/update_readme.py b/scripts/update_readme.py index 2d7a61b..268d57e 100755 --- a/scripts/update_readme.py +++ b/scripts/update_readme.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2018-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2018-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/tests/test_timezone_adjuster.py b/tests/test_timezone_adjuster.py index 30f46ad..b1c777f 100644 --- a/tests/test_timezone_adjuster.py +++ b/tests/test_timezone_adjuster.py @@ -1,4 +1,4 @@ -# Copyright 2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2020-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. diff --git a/tests/test_utils.py b/tests/test_utils.py index a165846..5ff48ce 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,4 +1,4 @@ -# Copyright 2018-2020 Florian Pigorsch & Contributors. All rights reserved. +# Copyright 2018-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file.