MCPcopy Create free account
hub / github.com/doldecomp/mkdd / flag_match

Function flag_match

tools/project.py:1892–1902  ·  view source on GitHub ↗
(
                flag: str, concrete: Set[str], prefixes: Tuple[str, ...]
            )

Source from the content-addressed store, hash-verified

1890 def append_cflags(flags: Iterable[str]) -> None:
1891 # Match a flag against either a set of concrete flags, or a set of prefixes.
1892 def flag_match(
1893 flag: str, concrete: Set[str], prefixes: Tuple[str, ...]
1894 ) -> bool:
1895 if flag in concrete:
1896 return True
1897
1898 for prefix in prefixes:
1899 if flag.startswith(prefix):
1900 return True
1901
1902 return False
1903
1904 # Determine whether a flag should be ignored.
1905 def should_ignore(flag: str) -> bool:

Callers 2

should_ignoreFunction · 0.85
should_passthroughFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected