diff options
author | hippo91 <guillaume.peillex@gmail.com> | 2021-01-20 18:52:32 +0100 |
---|---|---|
committer | hippo91 <guillaume.peillex@gmail.com> | 2021-01-20 18:52:32 +0100 |
commit | 01c678ad8a94be36ca316d63d08b1b79ab82ea11 (patch) | |
tree | 19edeeb691827d207699de93438c9d17aef10f3e | |
parent | e7a42443822dde8b2c954dab87abaa811b42fe8e (diff) | |
download | astroid-git-01c678ad8a94be36ca316d63d08b1b79ab82ea11.tar.gz |
Formatting according to black
-rw-r--r-- | astroid/brain/brain_type.py | 10 | ||||
-rw-r--r-- | tests/unittest_brain.py | 4 |
2 files changed, 4 insertions, 10 deletions
diff --git a/astroid/brain/brain_type.py b/astroid/brain/brain_type.py index 951d6bf3..fcd4e99c 100644 --- a/astroid/brain/brain_type.py +++ b/astroid/brain/brain_type.py @@ -18,12 +18,7 @@ Thanks to Lukasz Langa for fruitful discussion. """ import sys -from astroid import ( - MANAGER, - extract_node, - inference_tip, - nodes, -) +from astroid import MANAGER, extract_node, inference_tip, nodes def _looks_like_type_subscript(node): @@ -60,8 +55,7 @@ def infer_type_sub(node, context=None): return node.infer(context=context) - if sys.version_info[:2] == (3, 9): MANAGER.register_transform( nodes.Name, inference_tip(infer_type_sub), _looks_like_type_subscript - )
\ No newline at end of file + ) diff --git a/tests/unittest_brain.py b/tests/unittest_brain.py index 443fcb49..9e5e1b7c 100644 --- a/tests/unittest_brain.py +++ b/tests/unittest_brain.py @@ -952,7 +952,7 @@ class TypeBrain(unittest.TestCase): val_inf = src.annotation.value.inferred()[0] self.assertIsInstance(val_inf, astroid.ClassDef) self.assertEqual(val_inf.name, "type") - meth_inf = val_inf.getattr('__class_getitem__')[0] + meth_inf = val_inf.getattr("__class_getitem__")[0] self.assertIsInstance(meth_inf, astroid.FunctionDef) def test_invalid_type_subscript(self): @@ -970,7 +970,7 @@ class TypeBrain(unittest.TestCase): self.assertIsInstance(val_inf, astroid.ClassDef) self.assertEqual(val_inf.name, "str") with self.assertRaises(astroid.exceptions.AttributeInferenceError): - meth_inf = val_inf.getattr('__class_getitem__')[0] + meth_inf = val_inf.getattr("__class_getitem__")[0] @test_utils.require_version("3.6") |