Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
parser = etree.HTMLParser()
if xinclude:
# XXX: read_network limitation not yet supported # NOQA: T000
# for xinclude
rules_doc.xinclude()
if stop == 1:
return rules_doc
rules_doc = add_identifiers(rules_doc)
if stop == 2 or stop == 'add_identifiers':
return rules_doc
if update:
rules_doc = update_namespace(rules_doc)
if stop == 3:
return rules_doc
if css:
rules_doc = convert_css_selectors(rules_doc)
if stop == 4:
return rules_doc
rules_doc = fixup_theme_comment_selectors(rules_doc)
if stop == 5:
return rules_doc
rules_doc = expand_themes(rules_doc, parser, absolute_prefix, read_network)
if theme is not None:
rules_doc = add_theme(
rules_doc,
theme,
parser,
absolute_prefix,
read_network,
)
if stop == 6:
return rules_doc