Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/astroid/nodes/const.py: 50%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

2 statements  

1# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html 

2# For details: https://github.com/pylint-dev/astroid/blob/main/LICENSE 

3# Copyright (c) https://github.com/pylint-dev/astroid/blob/main/CONTRIBUTORS.txt 

4 

5OP_PRECEDENCE = { 

6 op: precedence 

7 for precedence, ops in enumerate( 

8 [ 

9 ["Lambda"], # lambda x: x + 1 

10 ["IfExp"], # 1 if True else 2 

11 ["or"], 

12 ["and"], 

13 ["not"], 

14 ["NamedExpr"], # (x := 1) 

15 ["Compare"], # in, not in, is, is not, <, <=, >, >=, !=, == 

16 ["|"], 

17 ["^"], 

18 ["&"], 

19 ["<<", ">>"], 

20 ["+", "-"], 

21 ["*", "@", "/", "//", "%"], 

22 ["UnaryOp"], # +, -, ~ 

23 ["**"], 

24 ["Await"], 

25 ] 

26 ) 

27 for op in ops 

28}