MCPcopy Index your code
hub / github.com/dbcli/pgcli / _compile_regex

Function _compile_regex

pgcli/packages/prioritization.py:13–17  ·  view source on GitHub ↗
(keyword)

Source from the content-addressed store, hash-verified

11
12
13def _compile_regex(keyword):
14 # Surround the keyword with word boundaries and replace interior whitespace
15 # with whitespace wildcards
16 pattern = "\\b" + white_space_regex.sub(r"\\s+", keyword) + "\\b"
17 return re.compile(pattern, re.MULTILINE | re.IGNORECASE)
18
19
20keywords = get_literals("keywords")

Callers 1

prioritization.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected