Skip to content

Commit

Permalink
Remove arrow dependency (#17)
Browse files Browse the repository at this point in the history
* Remove arrow dependency

* remove reference for arrow
  • Loading branch information
LKaemmerling committed Feb 18, 2019
1 parent 0d506a0 commit 95120b9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
8 changes: 3 additions & 5 deletions hcloud/helpers/descriptors.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
import arrow
from dateutil.parser import isoparse


class ISODateTime(object):
Expand All @@ -13,7 +13,5 @@ def __set__(self, obj, string_date):
if string_date is None:
self.val = None
else:
try:
self.val = arrow.get(string_date).datetime
except arrow.parser.ParserError:
raise ValueError('invalid date format')
# 2016-01-30T23:50+00:00
self.val = isoparse(string_date)
1 change: 0 additions & 1 deletion requirements/base.txt
@@ -1,4 +1,3 @@
arrow==0.12.1
future==0.17.1
python-dateutil==2.7.5
recommonmark==0.4.0
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/volumes/test_client.py
@@ -1,5 +1,5 @@
import pytest
import arrow
from dateutil.parser import isoparse
import mock

from hcloud.actions.client import BoundAction
Expand All @@ -24,7 +24,7 @@ def test_bound_volume_init(self, volume_response):
)

assert bound_volume.id == 1
assert bound_volume.created == arrow.get("2016-01-30T23:50:11+00:00").datetime
assert bound_volume.created == isoparse("2016-01-30T23:50:11+00:00")
assert bound_volume.name == "database-storage"
assert bound_volume.server == 12
assert bound_volume.size == 42
Expand Down

0 comments on commit 95120b9

Please sign in to comment.