Skip to content

Commit

Permalink
style: make ruff happy
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Cherng <[email protected]>
  • Loading branch information
jfcherng committed Feb 2, 2024
1 parent bd8fda9 commit cd1f4a6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions plugin/rules/constraints/is_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
interpreters_regex = rf"(?:{interpreters_regex}(?:[\-_]?\d+(?:\.\d+)*)?)"

self.first_line_regex: Pattern[str] = compile_regex(
merge_regexes(
(
# shebang
rf"^#!(?:.+)\b{interpreters_regex}\b",
# VIM's syntax line
rf"\bsyntax={interpreters_regex}(?=$|\\s)",
)
)
merge_regexes((
# shebang
rf"^#!(?:.+)\b{interpreters_regex}\b",
# VIM's syntax line
rf"\bsyntax={interpreters_regex}(?=$|\\s)",
))
)

def is_droppable(self) -> bool:
Expand Down

0 comments on commit cd1f4a6

Please sign in to comment.