MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / flag_match

Function flag_match

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

Source from the content-addressed store, hash-verified

1681 def append_cflags(flags: Iterable[str]) -> None:
1682 # Match a flag against either a set of concrete flags, or a set of prefixes.
1683 def flag_match(
1684 flag: str, concrete: Set[str], prefixes: Tuple[str, ...]
1685 ) -> bool:
1686 if flag in concrete:
1687 return True
1688
1689 for prefix in prefixes:
1690 if flag.startswith(prefix):
1691 return True
1692
1693 return False
1694
1695 # Determine whether a flag should be ignored.
1696 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