diff options
| author | Michele Simionato <michele.simionato@gmail.com> | 2020-01-15 14:13:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-15 14:13:31 +0100 |
| commit | fd6c59d0b4b530c711a3e34702b166f285e33629 (patch) | |
| tree | d8f981b4213488b799efaecc79da77145d8b317c | |
| parent | 8f64dfea5c32eb9d4b4859bf9e8b619b24044e2b (diff) | |
| parent | a3ead5af4f9ed3575004c8a7ec74138c26c52dd7 (diff) | |
| download | python-decorator-git-fd6c59d0b4b530c711a3e34702b166f285e33629.tar.gz | |
Merge pull request #78 from hugovk/fix-flake8-2020
Fix for Python 3.10
| -rw-r--r-- | src/decorator.py | 2 | ||||
| -rw-r--r-- | src/tests/documentation.py | 4 | ||||
| -rw-r--r-- | src/tests/test.py | 4 |
3 files changed, 5 insertions, 5 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(): """ diff --git a/src/tests/test.py b/src/tests/test.py index d73fbe4..7ddfaf4 100644 --- a/src/tests/test.py +++ b/src/tests/test.py @@ -29,7 +29,7 @@ def assertRaises(etype): raise Exception('Expected %s' % etype.__name__) -if sys.version >= '3.5': +if sys.version_info >= (3, 5): exec('''from asyncio import get_event_loop @decorator @@ -92,7 +92,7 @@ class DocumentationTestCase(unittest.TestCase): class ExtraTestCase(unittest.TestCase): def test_qualname(self): - if sys.version >= '3.3': + if sys.version_info >= (3, 3): self.assertEqual(doc.hello.__qualname__, 'hello') else: with assertRaises(AttributeError): |
