Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 15, 2023
1 parent e1b32ad commit a5d4775
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/test_encoder.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import re
import calendar
import re
from binascii import unhexlify
from collections import OrderedDict
from datetime import date, datetime, timedelta, timezone
Expand Down Expand Up @@ -444,11 +444,9 @@ def to_epoch(dt: datetime) -> float:
millis = int(dt.microsecond / 1000.0) / 1000.0
return calendar.timegm(dt.astimezone(timezone.utc).timetuple()) + millis


def encode_datetime(self, obj: datetime):
self.encode_float(to_epoch(obj))


dt = datetime(2013, 3, 21, 20, 4, 0, tzinfo=timezone.utc)
expected = unhexlify("fb41d452d9ec000000")
with BytesIO() as fp:
Expand Down

0 comments on commit a5d4775

Please sign in to comment.