Tests whether node represents a Python literal.
(node)
| 38 | |
| 39 | |
| 40 | def is_literal(node): |
| 41 | """Tests whether node represents a Python literal.""" |
| 42 | # Normal literals, True/False/None/Etc. in Python3 |
| 43 | if is_constant(node): |
| 44 | return True |
| 45 | |
| 46 | # True/False/None/Etc. in Python2 |
| 47 | if isinstance(node, gast.Name) and node.id in ['True', 'False', 'None']: |
| 48 | return True |
| 49 | |
| 50 | return False |
| 51 | |
| 52 | |
| 53 | def _is_ellipsis_gast_2(node): |
nothing calls this directly
no test coverage detected