MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / _is_first_party

Function _is_first_party

scripts/code-verify.py:1588–1596  ·  view source on GitHub ↗

True when `path` lives under app/qml or app/src — the only trees whose sources own the project's structural style. Vendored libraries (lib/), embedded examples, and generated artifacts keep their upstream layout even when they happen to match a tracked suffix.

(path: Path)

Source from the content-addressed store, hash-verified

1586
1587
1588def _is_first_party(path: Path) -> bool:
1589 """True when `path` lives under app/qml or app/src — the only trees whose
1590 sources own the project's structural style. Vendored libraries (lib/),
1591 embedded examples, and generated artifacts keep their upstream layout
1592 even when they happen to match a tracked suffix."""
1593 parts = path.resolve().parts
1594 return ("app", "qml") in zip(parts, parts[1:]) or ("app", "src") in zip(
1595 parts, parts[1:]
1596 )
1597
1598
1599# QJSEngine interruption may only be triggered from the dedicated watchdog

Callers 1

process_fileFunction · 0.85

Calls 1

resolveMethod · 0.45

Tested by

no test coverage detected