◆ adopt_module_signatures()
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin.adopt_module_signatures |
( |
| self, |
|
|
| other, |
|
|
| imported_names, |
|
|
| include_methods = False ) |
Learn an imported module's call signatures and defaults.
Each module gets its own Preprocessor, so a call to an imported
function is otherwise converted without the arguments its signature
defaults would supply.
Only entries owned by a name in `imported_names` are taken; the tables
are keyed by bare name, so adopting wholesale would let another
module's `__init__` answer arity checks for a local class. Methods are
taken only when `include_methods` is set, which excludes the operational
models: those deliberately simplify a constructor, and checking calls
against one would reject calls the converter handles (#4665).
Own definitions win: a locally defined name keeps its own signature.
◆ finalize_module()
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin.finalize_module |
( |
| self, |
|
|
| node ) |
Run generic_visit and inject helper nodes requested during traversal.
◆ visit_Module()
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin.visit_Module |
( |
| self, |
|
|
| node ) |
Back-compat entry point for callers not using import-aware seeds.
◆ _assignment_call_origins
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin._assignment_call_origins = saved_call_origins |
|
protected |
◆ _builtin_shadow_names
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin._builtin_shadow_names = self._scan_builtin_shadow_names(node) |
|
protected |
◆ _closed_lambda_bindings
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin._closed_lambda_bindings = self._scan_closed_lambda_bindings(node) |
|
protected |
◆ _eq_only_items_view_targets
| tuple preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin._eq_only_items_view_targets = (self._scan_eq_only_items_view_targets(node.body)) |
|
protected |
◆ _fixed_length_starred
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin._fixed_length_starred = self._scan_fixed_length_starred(node) |
|
protected |
◆ _needs_dataclass_field_helper
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin._needs_dataclass_field_helper |
|
protected |
◆ _needs_dataclass_getattr_helper
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin._needs_dataclass_getattr_helper |
|
protected |
◆ _needs_dataclass_initvar_import
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin._needs_dataclass_initvar_import |
|
protected |
◆ _needs_dataclass_replace_error_helper
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin._needs_dataclass_replace_error_helper |
|
protected |
◆ _unobservable_builtin_keys
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin._unobservable_builtin_keys = self._scan_unobservable_builtin_keys(node) |
|
protected |
◆ _vararg_alias_calls
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin._vararg_alias_calls = self._scan_vararg_alias_calls(node) |
|
protected |
◆ functionDefaults
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin.functionDefaults |
◆ functionKwonlyParams
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin.functionKwonlyParams |
◆ functionParams
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin.functionParams |
◆ functionVarargs
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin.functionVarargs |
◆ helper_functions_added
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin.helper_functions_added |
◆ is_entry_module
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin.is_entry_module |
◆ static_methods
| preprocessor.module_lifecycle_mixin.ModuleLifecycleMixin.static_methods |
The documentation for this class was generated from the following file: