Conditions | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | # -*- coding: utf-8 -*- |
||
19 | 1 | def datetime_from_iso8601(isodate, utc=False): |
|
20 | """ |
||
21 | convert ISO 8601 date string to datetime |
||
22 | """ |
||
23 | 1 | try: |
|
24 | 1 | date = iso8601.parse_date(isodate) |
|
25 | 1 | if utc: |
|
26 | 1 | return date.astimezone(pytz.utc) |
|
27 | |||
28 | 1 | return date |
|
29 | 1 | except (AttributeError, iso8601.ParseError): |
|
30 | 1 | return None |
|
31 | |||
52 |
This can be caused by one of the following:
1. Missing Dependencies
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
2. Missing __init__.py files
This error could also result from missing
__init__.py
files in your module folders. Make sure that you place one file in each sub-folder.