Skip to content

Commit ccc6f9c

Browse files
fix: remove unused _CLASSLIST_PATTERN (dead code in CSS-module fix)
1 parent f8809cd commit ccc6f9c

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

src/deadcode/scanner.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,6 @@ def unreferenced_components(self) -> list[Finding]:
141141
r"""\b\w+\.(?:_?[\w$]+)|(\w+)\[['"]([\w$-]+)['"]\]""",
142142
)
143143

144-
# DOM classList API: `el.classList.add('foo')` / `toggle('bar')` / `remove(...)`
145-
# / `contains('baz')`. Dynamic class names referenced here are real uses.
146-
_CLASSLIST_PATTERN = re.compile(
147-
r"""classList\.(?:add|remove|toggle|contains)\(\s*['"]([\w$-]+)['"]""",
148-
)
149-
150144
# Detect a CSS-module import so we know which source-file class accessors
151145
# correspond to module classes (``import styles from './x.module.css'``).
152146
_CSS_MODULE_IMPORT_PATTERN = re.compile(

0 commit comments

Comments
 (0)