diff options
| author | Hugo <hugovk@users.noreply.github.com> | 2020-01-08 23:02:12 +0200 |
|---|---|---|
| committer | Hugo <hugovk@users.noreply.github.com> | 2020-01-08 23:02:12 +0200 |
| commit | a3ead5af4f9ed3575004c8a7ec74138c26c52dd7 (patch) | |
| tree | 83e9bd85f723c4581d4e1cff232ae663d70fd9a4 | |
| parent | 619b80812ba0c35bfefa4b7ab5888168a541649c (diff) | |
| download | python-decorator-git-a3ead5af4f9ed3575004c8a7ec74138c26c52dd7.tar.gz | |
Fix: sys.version compared to string (python10), use sys.version_info
| -rw-r--r-- | src/decorator.py | 2 | ||||
| -rw-r--r-- | src/tests/documentation.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/decorator.py b/src/decorator.py index d5ac595..f1eaf57 100644 --- a/src/decorator.py +++ b/src/decorator.py @@ -42,7 +42,7 @@ import collections __version__ = '4.4.1' -if sys.version >= '3': +if sys.version_info >= (3,): from inspect import getfullargspec def get_init(cls): diff --git a/src/tests/documentation.py b/src/tests/documentation.py index 60a37a2..2256fea 100644 --- a/src/tests/documentation.py +++ b/src/tests/documentation.py @@ -1421,7 +1421,7 @@ Another attribute copied from the original function is ``__qualname__``, the qualified name. This attribute was introduced in Python 3.3. """ -if sys.version < '3': +if sys.version_info < (3,): function_annotations = '' today = time.strftime('%Y-%m-%d') @@ -1654,7 +1654,7 @@ def a_test_for_pylons(): """ -if sys.version >= '3': # tests for signatures specific to Python 3 +if sys.version_info >= (3,): # tests for signatures specific to Python 3 def test_kwonlydefaults(): """ |
