class State: (source)
The state for a module.
The source is only used for the -c command line option; in that case path is None. Otherwise source is None and path isn't.
Method | __init__ |
Undocumented |
Method | add_ancestors |
Undocumented |
Method | add_dependency |
Undocumented |
Method | check_blockers |
Raise CompileError if a blocking error is detected. |
Method | compute_dependencies |
Compute a module's dependencies after parsing it. |
Method | compute_fine_grained_deps |
Undocumented |
Method | dependency_lines |
Undocumented |
Method | dependency_priorities |
Undocumented |
Method | finish_passes |
Undocumented |
Method | fix_cross_refs |
Undocumented |
Method | free_state |
Undocumented |
Method | generate_unused_ignore_notes |
Undocumented |
Method | is_fresh |
Return whether the cache data for this file is fresh. |
Method | is_interface_fresh |
Undocumented |
Method | load_fine_grained_deps |
Undocumented |
Method | load_tree |
Undocumented |
Method | mark_as_rechecked |
Marks this module as having been fully re-analyzed by the type-checker. |
Method | mark_interface_stale |
Marks this module as having a stale public interface, and discards the cache data. |
Method | parse_file |
Parse file and run first pass of semantic analysis. |
Method | parse_inline_configuration |
Check for inline mypy: options directive and parse them. |
Method | semantic_analysis_pass1 |
Perform pass 1 of semantic analysis, which happens immediately after parsing. |
Method | suppress_dependency |
Undocumented |
Method | type_check_first_pass |
Undocumented |
Method | type_check_second_pass |
Undocumented |
Method | type_checker |
Undocumented |
Method | type_map |
Undocumented |
Method | update_fine_grained_deps |
Undocumented |
Method | valid_references |
Undocumented |
Method | verify_dependencies |
Report errors for import targets in modules that don't exist. |
Method | wrap_context |
Temporarily change the error import context to match this state. |
Method | write_cache |
Undocumented |
Class Variable | data |
Undocumented |
Class Variable | fine_grained_deps_loaded |
Undocumented |
Class Variable | order_counter |
Undocumented |
Class Variable | transitive_error |
Undocumented |
Instance Variable | abspath |
Undocumented |
Instance Variable | ancestors |
Undocumented |
Instance Variable | caller_line |
Undocumented |
Instance Variable | caller_state |
Undocumented |
Instance Variable | dep_line_map |
Undocumented |
Instance Variable | dependencies |
Undocumented |
Instance Variable | dependencies_set |
Undocumented |
Instance Variable | early_errors |
Undocumented |
Instance Variable | externally_same |
Undocumented |
Instance Variable | id |
Undocumented |
Instance Variable | ignore_all |
Undocumented |
Instance Variable | import_context |
Undocumented |
Instance Variable | interface_hash |
Undocumented |
Instance Variable | manager |
Undocumented |
Instance Variable | meta |
Undocumented |
Instance Variable | meta_source_hash |
Undocumented |
Instance Variable | options |
Undocumented |
Instance Variable | order |
Undocumented |
Instance Variable | path |
Undocumented |
Instance Variable | priorities |
Undocumented |
Instance Variable | source |
Undocumented |
Instance Variable | source_hash |
Undocumented |
Instance Variable | suppressed |
Undocumented |
Instance Variable | suppressed_set |
Undocumented |
Instance Variable | tree |
Undocumented |
Instance Variable | xpath |
Undocumented |
Property | xmeta |
Undocumented |
Method | _patch_indirect_dependencies |
Undocumented |
Instance Variable | _type_checker |
Undocumented |
Undocumented
Parameters | |
id:Optional[ | Undocumented |
path:Optional[ | Undocumented |
source:Optional[ | Undocumented |
manager:BuildManager | Undocumented |
caller_state:Optional[ | Undocumented |
caller_line:int | Undocumented |
ancestor_for:Optional[ | Undocumented |
root_source:bool | Undocumented |
temporary:bool | Undocumented |
Compute a module's dependencies after parsing it.
This is used when we parse a file that we didn't have up-to-date cache information for. When we have an up-to-date cache, we just use the cached info.
Parameters | |
on_errors:bool | Undocumented |
Parse file and run first pass of semantic analysis.
Everything done here is local to the file. Don't depend on imported modules in any way. Also record module dependencies based on imports.
Perform pass 1 of semantic analysis, which happens immediately after parsing.
This pass can't assume that any other modules have been processed yet.
Report errors for import targets in modules that don't exist.
If suppressed_only is set, only check suppressed dependencies.
Parameters | |
suppressed_only:bool | Undocumented |
Temporarily change the error import context to match this state.
Also report an internal error if an unexpected exception was raised and raise an exception on a blocking error, unless check_blockers is False. Skipping blocking error reporting is used in the semantic analyzer so that we can report all blocking errors for a file (across multiple targets) to maintain backward compatibility.
Parameters | |
check_blockers:bool | Undocumented |
Returns | |
Iterator[ | Undocumented |