Skip to content

Commit

Permalink
Merge pull request #81 from yihong0618/master
Browse files Browse the repository at this point in the history
fix: #80
  • Loading branch information
flopp authored Feb 24, 2021
2 parents 57aa34f + 506f95b commit f51a133
Show file tree
Hide file tree
Showing 26 changed files with 29 additions and 30 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion gpxtrackposter/calendar_drawer.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gpxtrackposter/circular_drawer.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gpxtrackposter/cli.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gpxtrackposter/exceptions.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gpxtrackposter/github_drawer.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gpxtrackposter/grid_drawer.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gpxtrackposter/heatmap_drawer.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gpxtrackposter/localization.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gpxtrackposter/poster.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gpxtrackposter/quantity_range.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
7 changes: 3 additions & 4 deletions gpxtrackposter/timezone_adjuster.py
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
2 changes: 1 addition & 1 deletion gpxtrackposter/track.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gpxtrackposter/track_loader.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gpxtrackposter/tracks_drawer.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gpxtrackposter/units.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gpxtrackposter/utils.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gpxtrackposter/value_range.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gpxtrackposter/xy.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gpxtrackposter/year_range.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion scripts/bump_year.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions scripts/check_copyright.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion scripts/update_readme.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_timezone_adjuster.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit f51a133

Please sign in to comment.