Skip to content

Commit 4abe80b

Browse files
author
GitHub Copilot
committed
cleanup(scanner): retire dead compatibility import-retention seams
1 parent 8931f12 commit 4abe80b

1 file changed

Lines changed: 16 additions & 64 deletions

File tree

src/prism/scanner.py

Lines changed: 16 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -99,83 +99,31 @@
9999
normalize_style_heading,
100100
parse_style_readme,
101101
)
102-
from ._jinja_analyzer import ( # noqa: F401
103-
_JINJA_AST_ENV,
104-
_stringify_jinja_node,
102+
from ._jinja_analyzer import (
105103
_scan_text_for_all_filters_with_ast,
106104
_scan_text_for_default_filters_with_ast,
107-
_collect_undeclared_jinja_variables,
108-
_collect_undeclared_jinja_variables_from_ast,
109-
_collect_jinja_local_bindings_from_text,
110-
_collect_jinja_local_bindings,
111-
_extract_jinja_name_targets,
112105
)
113-
from .scanner_extract import ( # noqa: F401
114-
TASK_INCLUDE_KEYS,
115-
INCLUDE_VARS_KEYS,
116-
SET_FACT_KEYS,
117-
TASK_BLOCK_KEYS,
118-
TASK_META_KEYS,
119-
ROLE_NOTES_RE,
120-
ROLE_NOTES_SHORT_RE,
121-
TASK_NOTES_LONG_RE,
122-
TASK_NOTES_SHORT_RE,
123-
COMMENT_CONTINUATION_RE,
124-
_normalize_exclude_patterns,
106+
from .scanner_extract import (
125107
_is_relpath_excluded,
126108
_is_path_excluded,
127-
_format_inline_yaml,
128-
_load_yaml_file,
129-
_iter_task_include_targets,
130-
_iter_task_mappings,
131-
_resolve_task_include,
132-
_collect_task_files,
133-
_extract_role_notes_from_comments,
134-
_split_task_annotation_label,
135-
_extract_task_annotations_for_file,
136-
_task_anchor,
137-
_detect_task_module,
138-
_extract_collection_from_module_name,
139-
_compact_task_parameters,
109+
_extract_default_target_var,
110+
_collect_include_vars_files,
140111
_collect_unconstrained_dynamic_role_includes,
141112
_collect_unconstrained_dynamic_task_includes,
142113
_collect_task_handler_catalog,
143114
_collect_molecule_scenarios,
144-
extract_role_features,
145-
DEFAULT_TARGET_RE,
146-
JINJA_VAR_RE,
147-
JINJA_IDENTIFIER_RE,
148-
VAULT_KEY_RE,
149-
IGNORED_IDENTIFIERS,
150-
_SECRET_NAME_TOKENS,
151-
_VAULT_MARKERS,
152-
_CREDENTIAL_PREFIXES,
153-
_URL_PREFIXES,
154-
_extract_default_target_var,
155-
_collect_include_vars_files,
156-
_collect_set_fact_names,
157-
_collect_register_names,
158-
_find_variable_line_in_yaml,
159-
_collect_dynamic_include_vars_refs,
160-
_collect_dynamic_task_include_refs,
161-
_collect_referenced_variable_names,
115+
_extract_role_notes_from_comments,
162116
_looks_secret_name,
163117
_resembles_password_like,
164-
_is_sensitive_variable,
165-
_looks_secret_value,
166-
_infer_variable_type,
167-
_read_seed_yaml,
168-
_resolve_seed_var_files,
118+
_load_yaml_file,
119+
_collect_task_files,
120+
extract_role_features,
169121
load_seed_variables,
170122
)
171-
from .scanner_readme import ( # noqa: F401
172-
_describe_variable,
173-
_is_role_local_variable_row,
174-
_render_role_notes_section,
175-
_render_role_variables_for_style,
176-
_render_template_overrides_section,
177-
_render_variable_summary_section,
178-
_render_variable_uncertainty_notes,
123+
from .scanner_extract import ( # noqa: F401
124+
_split_task_annotation_label,
125+
_task_anchor,
126+
IGNORED_IDENTIFIERS,
179127
)
180128
from .scanner_readme import render_readme as _readme_render_readme
181129

@@ -187,6 +135,10 @@
187135

188136
# Sensitivity detection tokens extracted from policy for fast tuple lookup
189137
_SENSITIVITY = _POLICY["sensitivity"]
138+
_SECRET_NAME_TOKENS: tuple[str, ...] = tuple(_SENSITIVITY["name_tokens"])
139+
_VAULT_MARKERS: tuple[str, ...] = tuple(_SENSITIVITY["vault_markers"])
140+
_CREDENTIAL_PREFIXES: tuple[str, ...] = tuple(_SENSITIVITY["credential_prefixes"])
141+
_URL_PREFIXES: tuple[str, ...] = tuple(_SENSITIVITY["url_prefixes"])
190142

191143
# Variable guidance priority keywords
192144
_VARIABLE_GUIDANCE_KEYWORDS: tuple[str, ...] = tuple(

0 commit comments

Comments
 (0)