Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.10/site-packages/astroid/nodes/const.py: 100%
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
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
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
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 ["Compare"], # in, not in, is, is not, <, <=, >, >=, !=, ==
15 ["|"],
16 ["^"],
17 ["&"],
18 ["<<", ">>"],
19 ["+", "-"],
20 ["*", "@", "/", "//", "%"],
21 ["UnaryOp"], # +, -, ~
22 ["**"],
23 ["Await"],
24 ]
25 )
26 for op in ops
27}