Commit 386095d4ad7a1738a76d13c63e276e3da7578e5a
1 parent
3cc3c0b9
Improve PEP8 compliance in etender_service.py
Showing
1 changed file
with
12 additions
and
10 deletions
1 | +from datetime import date, datetime, timedelta | ||
2 | +from dateutil.parser import parse | ||
3 | +from dateutil.tz import tzlocal | ||
1 | from iso8601 import parse_date | 4 | from iso8601 import parse_date |
5 | +from jsonpath_rw import parse as parse_path | ||
6 | +from pytz import timezone | ||
2 | from robot.output import LOGGER | 7 | from robot.output import LOGGER |
3 | from robot.output.loggerhelper import Message | 8 | from robot.output.loggerhelper import Message |
4 | from robot.libraries.BuiltIn import BuiltIn | 9 | from robot.libraries.BuiltIn import BuiltIn |
5 | from robot.errors import HandlerExecutionFailed | 10 | from robot.errors import HandlerExecutionFailed |
6 | -from datetime import datetime, timedelta, date | ||
7 | -from dateutil.parser import parse | ||
8 | -from dateutil.tz import tzlocal | ||
9 | -from pytz import timezone | ||
10 | -from jsonpath_rw import parse as parse_path | ||
11 | -import time | ||
12 | from op_robot_tests.tests_files.initial_data import ( | 11 | from op_robot_tests.tests_files.initial_data import ( |
13 | test_tender_data | 12 | test_tender_data |
14 | ) | 13 | ) |
14 | +import time | ||
15 | 15 | ||
16 | TIMEZONE = timezone('Europe/Kiev') | 16 | TIMEZONE = timezone('Europe/Kiev') |
17 | 17 | ||
18 | + | ||
18 | def convert_date_to_etender_format(isodate): | 19 | def convert_date_to_etender_format(isodate): |
19 | - iso_dt=parse_date(isodate) | 20 | + iso_dt = parse_date(isodate) |
20 | date_string = iso_dt.strftime("%d-%m-%Y") | 21 | date_string = iso_dt.strftime("%d-%m-%Y") |
21 | - return date_string | 22 | + return date_string |
23 | + | ||
22 | 24 | ||
23 | def convert_time_to_etender_format(isodate): | 25 | def convert_time_to_etender_format(isodate): |
24 | - iso_dt=parse_date(isodate) | 26 | + iso_dt = parse_date(isodate) |
25 | time_string = iso_dt.strftime("%H:%M") | 27 | time_string = iso_dt.strftime("%H:%M") |
26 | - return time_string | 28 | + return time_string |
Please
register
or
login
to post a comment