Compare commits

..

7 Commits

Author SHA1 Message Date
kennethreitz 7814ec2864 fix broken tests 2017-05-27 13:04:22 -04:00
kennethreitz f39c932039 cleanups 2017-05-27 12:12:58 -04:00
kennethreitz 96ff770071 move things around 2017-05-27 12:11:51 -04:00
kennethreitz cd16ee94f0 move things around 2017-05-27 12:11:45 -04:00
kennethreitz 7c68489682 tests 2017-05-27 12:10:48 -04:00
kennethreitz 93e163722b Merge branch 'Tafkas-master' 2017-05-27 12:08:32 -04:00
kennethreitz b3ac13fcbf Merge pull request #59 from Tafkas/master
add compatibility for Python3
2017-05-27 09:08:18 -07:00
6 changed files with 11 additions and 10 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
tests:
pytest test_maya.py
pytest test_maya.py test_maya_interval.py
+1
View File
@@ -0,0 +1 @@
from .core import *
View File
+7 -7
View File
@@ -19,7 +19,7 @@ import dateparser
import pendulum
from tzlocal import get_localzone
from compat import cmp, comparable
from .compat import cmp, comparable
_EPOCH_START = (1970, 1, 1)
@@ -66,23 +66,23 @@ class MayaDT(object):
@validate_class_type_arguments('!=')
def __ne__(self, maya_dt):
return self._epoch != maya_dt._epoch
return int(self._epoch) != int(maya_dt._epoch)
@validate_class_type_arguments('<')
def __lt__(self, maya_dt):
return self._epoch < maya_dt._epoch
return int(self._epoch) < int(maya_dt._epoch)
@validate_class_type_arguments('<=')
def __le__(self, maya_dt):
return self._epoch <= maya_dt._epoch
return int(self._epoch) <= int(maya_dt._epoch)
@validate_class_type_arguments('>')
def __gt__(self, maya_dt):
return self._epoch > maya_dt._epoch
return int(self._epoch) > int(maya_dt._epoch)
@validate_class_type_arguments('>=')
def __ge__(self, maya_dt):
return self._epoch >= maya_dt._epoch
return int(self._epoch) >= int(maya_dt._epoch)
def __hash__(self):
return hash(int(self.epoch))
@@ -244,7 +244,7 @@ class MayaDT(object):
@property
def epoch(self):
return self._epoch
return int(self._epoch)
# Human Slang Extras
# ------------------
+1 -1
View File
@@ -41,7 +41,7 @@ setup(
author='Kenneth Reitz',
author_email='me@kennethreitz.org',
url='https://github.com/kennethreitz/maya',
py_modules=['maya'],
packages=['maya'],
install_requires=required,
license='MIT',
classifiers=(
+1 -1
View File
@@ -5,7 +5,7 @@ import pytest
import pytz
import maya
from compat import cmp
from maya.compat import cmp
Los_Angeles = pytz.timezone('America/Los_Angeles')
New_York = pytz.timezone('America/New_York')