Skip to content

Commit

Permalink
Fixes for new version of isodatetime
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno P. Kinoshita authored and kinow committed Nov 3, 2018
1 parent 0850d72 commit ba409d4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/cylc/cycling/iso8601.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from isodatetime.data import Calendar, Duration
from isodatetime.dumpers import TimePointDumper
from isodatetime.timezone import (
get_local_time_zone, get_local_time_zone_format)
get_local_time_zone, get_local_time_zone_format, TimeZoneFormatMode)
from cylc.time_parser import CylcTimeParser
from cylc.cycling import (
PointBase, IntervalBase, SequenceBase, ExclusionBase, PointParsingError,
Expand Down Expand Up @@ -676,7 +676,7 @@ def init(num_expanded_year_digits=0, custom_dump_format=None, time_zone=None,
time_zone = "Z"
time_zone_hours_minutes = (0, 0)
else:
time_zone = get_local_time_zone_format(reduced_mode=True)
time_zone = get_local_time_zone_format(TimeZoneFormatMode.reduced)
time_zone_hours_minutes = get_local_time_zone()
else:
time_zone_hours_minutes = TimePointDumper().get_time_zone(time_zone)
Expand Down
7 changes: 4 additions & 3 deletions lib/cylc/wallclock.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from datetime import datetime, timedelta

from isodatetime.timezone import (
get_local_time_zone_format, get_local_time_zone)
get_local_time_zone_format, get_local_time_zone, TimeZoneFormatMode)


DATE_TIME_FORMAT_BASIC = "%Y%m%dT%H%M%S"
Expand All @@ -39,9 +39,10 @@
TIME_FORMAT_EXTENDED = "%H:%M:%S"
TIME_FORMAT_EXTENDED_SUB_SECOND = "%H:%M:%S.%f"

TIME_ZONE_STRING_LOCAL_BASIC = get_local_time_zone_format(reduced_mode=True)
TIME_ZONE_STRING_LOCAL_BASIC = get_local_time_zone_format(
TimeZoneFormatMode.reduced)
TIME_ZONE_STRING_LOCAL_EXTENDED = get_local_time_zone_format(
extended_mode=True, reduced_mode=True)
TimeZoneFormatMode.extended)
TIME_ZONE_STRING_UTC = "Z"
TIME_ZONE_UTC_UTC_OFFSET = (0, 0)
TIME_ZONE_LOCAL_UTC_OFFSET = get_local_time_zone()
Expand Down
1 change: 0 additions & 1 deletion tests/syntax/00-pep8.t
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ set_test_number 3
# - PEP8 allows both, line break before binary preferred for new code.
run_ok "${TEST_NAME_BASE}" pep8 --ignore=E402,W503,W504 \
"${CYLC_DIR}/lib/cylc" \
"${CYLC_DIR}/lib/isodatetime" \
"${CYLC_DIR}/lib/Jinja2Filters"/*.py \
"${CYLC_DIR}/lib/parsec"/*.py \
$(grep -l '#!.*\<python\>' "${CYLC_DIR}/bin/"*)
Expand Down
1 change: 0 additions & 1 deletion tests/syntax/01-pycodestyle.t
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ set_test_number 3
run_ok "${TEST_NAME_BASE}" pycodestyle \
--ignore=E402,W503,W504 \
"${CYLC_DIR}/lib/cylc" \
"${CYLC_DIR}/lib/isodatetime" \
"${CYLC_DIR}/lib/Jinja2Filters"/*.py \
"${CYLC_DIR}/lib/parsec"/*.py \
$(grep -l '#!.*\<python\>' "${CYLC_DIR}/bin/"*)
Expand Down

0 comments on commit ba409d4

Please sign in to comment.