Class | MarkImportsMypyOnlyVisitor |
Visitor that sets is_mypy_only (which affects priority). |
Class | MarkImportsUnreachableVisitor |
Visitor that flags all imports nested within a node as unreachable. |
Function | assert_will_always_fail |
Undocumented |
Function | consider_sys_platform |
Consider whether expr is a comparison involving sys.platform. |
Function | consider_sys_version_info |
Consider whether expr is a comparison involving sys.version_info. |
Function | contains_int_or_tuple_of_ints |
Undocumented |
Function | contains_sys_version_info |
Undocumented |
Function | fixed_comparison |
Undocumented |
Function | infer_condition_value |
Infer whether the given condition is always true/false. |
Function | infer_reachability_of_if_statement |
Undocumented |
Function | is_sys_attr |
Undocumented |
Function | mark_block_mypy_only |
Undocumented |
Function | mark_block_unreachable |
Undocumented |
Constant | ALWAYS_FALSE |
Undocumented |
Constant | ALWAYS_TRUE |
Undocumented |
Constant | inverted_truth_mapping |
Undocumented |
Constant | MYPY_FALSE |
Undocumented |
Constant | MYPY_TRUE |
Undocumented |
Constant | reverse_op |
Undocumented |
Constant | TRUTH_VALUE_UNKNOWN |
Undocumented |
Variable | Targ |
Undocumented |
Consider whether expr is a comparison involving sys.platform.
Return ALWAYS_TRUE, ALWAYS_FALSE, or TRUTH_VALUE_UNKNOWN.
Parameters | |
expr:Expression | Undocumented |
platform:str | Undocumented |
Returns | |
int | Undocumented |
Consider whether expr is a comparison involving sys.version_info.
Return ALWAYS_TRUE, ALWAYS_FALSE, or TRUTH_VALUE_UNKNOWN.
Parameters | |
expr:Expression | Undocumented |
pyversion:Tuple[ | Undocumented |
Returns | |
int | Undocumented |
Undocumented
Parameters | |
expr:Expression | Undocumented |
Returns | |
Union[ | Undocumented |
Undocumented
Parameters | |
expr:Expression | Undocumented |
Returns | |
Union[ | Undocumented |
Infer whether the given condition is always true/false.
Return ALWAYS_TRUE if always true, ALWAYS_FALSE if always false, MYPY_TRUE if true under mypy and false at runtime, MYPY_FALSE if false under mypy and true at runtime, else TRUTH_VALUE_UNKNOWN.
Parameters | |
expr:Expression | Undocumented |
options:Options | Undocumented |
Returns | |
int | Undocumented |
Undocumented
Value |
|