From ceb0d9881795089b311677251d4b25ebe2702d61 Mon Sep 17 00:00:00 2001 From: Bartlomiej Flis Date: Sun, 17 May 2026 14:20:11 +0200 Subject: [PATCH 1/7] chore: adopt shamefile for tracked lint suppressions Document every existing `# noqa`, `# type: ignore`, and `# pragma: no cover` via shamefile so each suppression has a written why. - add shamefile>=0.1.6 to dev extras - init shamefile.yaml with 140 entries, all documented - wire pre-commit hook (BKDDFS/shamefile) - gate CI lint workflow on `shame me . --dry-run` Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/lint.yml | 3 + .pre-commit-config.yaml | 5 + pyproject.toml | 1 + shamefile.yaml | 1341 ++++++++++++++++++++++++++++++++++++ uv.lock | 18 + 5 files changed, 1368 insertions(+) create mode 100644 shamefile.yaml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cfc44fd..271b62f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,3 +35,6 @@ jobs: - name: MyPy omniray run: uv run --directory packages/omniray mypy omniray/ + + - name: Shamefile check + run: uv run shame me . --dry-run diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e24e7df..2a1a88f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,3 +24,8 @@ repos: additional_dependencies: [wrapt, pydantic, opentelemetry-api, opentelemetry-sdk] files: ^packages/ exclude: tests/ + + - repo: https://github.com/BKDDFS/shamefile + rev: main + hooks: + - id: shamefile diff --git a/pyproject.toml b/pyproject.toml index 81e9d3d..01a7aa6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ dev = [ "mypy>=1.15", "types-psutil>=7.0", "pip-licenses>=5.0", + "shamefile>=0.1.6", ] docs = [ "mkdocs-material>=9.0", diff --git a/shamefile.yaml b/shamefile.yaml new file mode 100644 index 0000000..77f5b8e --- /dev/null +++ b/shamefile.yaml @@ -0,0 +1,1341 @@ +# yamllint disable-file +--- +config: {} +entries: + + - location: ./benchmarks/bench_tracer_overhead.py:52 + token: '# noqa' + content: 'flags_mod._default_flags_cache.clear() # noqa: SLF001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + benchmark needs to reset internal lru_cache between runs; no public API + exposes that singleton + + - location: ./benchmarks/bench_tracer_overhead.py:91 + token: '# noqa' + content: 'devnull = open(os.devnull, "w") # noqa: SIM115, PTH123' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + benchmark keeps stream open for lifetime of run; context manager would + skew timings + + - location: ./examples/big_red_button/__main__.py:12 + token: '# noqa' + content: 'from examples.big_red_button.launch import BigRedButton # noqa: E402' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + wrap_all must run before importing modules to be traced; import order is + intentional for demo + + - location: ./examples/big_red_button/app.py:19 + token: '# noqa' + content: 'from fastapi import FastAPI # noqa: E402' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + wrap_all must run before importing modules to be traced; import order is + intentional for demo + + - location: ./examples/big_red_button/app.py:20 + token: '# noqa' + content: 'from fastapi.responses import HTMLResponse # noqa: E402' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + wrap_all must run before importing modules to be traced; import order is + intentional for demo + + - location: ./examples/big_red_button/app.py:21 + token: '# noqa' + content: 'from starlette.responses import StreamingResponse # noqa: E402' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + wrap_all must run before importing modules to be traced; import order is + intentional for demo + + - location: ./examples/big_red_button/app.py:23 + token: '# noqa' + content: 'from examples.big_red_button.launch import BigRedButton # noqa: E402' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + wrap_all must run before importing modules to be traced; import order is + intentional for demo + + - location: ./packages/omniray/omniray/decorators.py:25 + token: '# noqa' + content: 'func._omniwrap_skip = True # type: ignore[attr-defined] # noqa: SLF001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + _omniwrap_skip is omniwrap's documented sentinel attribute for opting out + of auto-wrap; cross-package contract, not encapsulation violation + + - location: ./packages/omniray/omniray/decorators.py:25 + token: '# type: ignore' + content: 'func._omniwrap_skip = True # type: ignore[attr-defined] # noqa: SLF001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + plain functions don't declare _omniwrap_skip in their type; attribute set + as runtime marker only + + - location: ./packages/omniray/omniray/decorators.py:29 + token: '# noqa' + content: 'def trace[**P, T]( # noqa: PLR0913' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + trace() exposes 8 user-facing tracing knobs as keyword-only args; each is + a public override of a global flag and merging them would hurt + discoverability + + - location: ./packages/omniray/omniray/decorators.py:82 + token: '# type: ignore' + content: 'return _exclude_from_omniwrap(async_wrapper) # type: ignore[return-value, arg-type]' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + mypy can't prove async_wrapper satisfies Callable[P, T] — inner return + is CallResult (Any), not T; @wraps + ParamSpec preserve actual signature + at runtime/callers + + - location: ./packages/omniray/omniray/decorators.py:101 + token: '# type: ignore' + content: 'return _exclude_from_omniwrap(sync_wrapper) # type: ignore[return-value]' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + same reason as async variant: sync_wrapper returns CallResult (Any) not T; + ParamSpec/@wraps preserve actual signature + + - location: ./packages/omniray/omniray/decorators.py:106 + token: '# noqa' + content: 'def create_trace_wrapper( # noqa: PLR0913' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + create_trace_wrapper mirrors trace()'s 8 user-facing knobs; merging them + into a config object would split the public surface + + - location: ./packages/omniray/omniray/tracing/compactor.py:51 + token: '# noqa' + content: 'def add( # noqa: PLR0913' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + add() aggregates 5 optional per-call metrics in a single pass; merging + into struct would force callers to build it on hot path + + - location: ./packages/omniray/omniray/tracing/compactor.py:154 + token: '# noqa' + content: 'def note_exit_success( # noqa: PLR0913' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + note_exit_success forwards 5 optional metric channels into streak buffer; + same per-call metric set as add() + + - location: ./packages/omniray/omniray/tracing/compactor.py:227 + token: '# noqa' + content: 'profilers._colored(Fore.RED + Style.BRIGHT, f"x{streak.count}"), # noqa: SLF001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + profilers._colored is the package-internal color helper reused across + tracing modules; module-private not type-private + + - location: ./packages/omniray/omniray/tracing/compactor.py:271 + token: '# noqa' + content: 'color = profilers._bucket_color(value_ms, thresholds.duration_ms) # noqa: SLF001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + _bucket_color is a package-internal duration coloring helper shared across + tracing modules; module-private not type-private + + - location: ./packages/omniray/omniray/tracing/compactor.py:272 + token: '# noqa' + content: 'return profilers._colored(color, f"{value_ms:.2f}ms") # noqa: SLF001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + profilers._colored is the package-internal color helper reused across + tracing modules; module-private not type-private + + - location: ./packages/omniray/omniray/tracing/compactor.py:279 + token: '# noqa' + content: 'parts.append("Σin: " + profilers._format_mb(streak.total_input_mb, thresholds.size_mb)) # noqa: SLF001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + _format_mb is profilers' package-internal size formatter shared across + tracing output paths; module-private not type-private + + - location: ./packages/omniray/omniray/tracing/compactor.py:281 + token: '# noqa' + content: 'parts.append("Σout: " + profilers._format_mb(streak.total_output_mb, thresholds.size_mb)) # noqa: SLF001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + _format_mb is profilers' package-internal size formatter shared across + tracing output paths; module-private not type-private + + - location: ./packages/omniray/omniray/tracing/compactor.py:283 + token: '# noqa' + content: 'parts.append("rss: " + profilers._format_mb(streak.max_rss_mb, thresholds.rss_mb)) # noqa: SLF001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + _format_mb is profilers' package-internal size formatter shared across + tracing output paths; module-private not type-private + + - location: ./packages/omniray/omniray/tracing/compactor.py:287 + token: '# noqa' + content: '+ profilers._format_mb( # noqa: SLF001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + _format_mb is profilers' package-internal size formatter shared across + tracing output paths; module-private not type-private + + - location: ./packages/omniray/omniray/tracing/compactor.py:292 + token: '# noqa' + content: 'parts.append("peak: " + profilers._format_mb(streak.max_rss_peak_mb, thresholds.rss_mb)) # noqa: SLF001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + _format_mb is profilers' package-internal size formatter shared across + tracing output paths; module-private not type-private + + - location: ./packages/omniray/omniray/tracing/flags.py:49 + token: '# noqa' + content: 'def resolve_trace_flags( # noqa: PLR0913' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + 8 nullable flags resolved per trace call; aggregating into a struct would + force allocation on hot path (caller-side construction) + + - location: ./packages/omniray/omniray/tracing/flags.py:102 + token: '# noqa' + content: 'def _resolve_all( # noqa: PLR0913' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + internal helper that mirrors resolve_trace_flags signature; splitting + would just duplicate plumbing + + - location: ./packages/omniray/omniray/tracing/otel.py:32 + token: '# noqa' + content: 'from opentelemetry import trace as api # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + opentelemetry is an optional dependency; import lives inside try/except to + keep import-time graceful when otel extras not installed + + - location: ./packages/omniray/omniray/tracing/otel.py:33 + token: '# noqa' + content: 'from opentelemetry.trace import INVALID_SPAN # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + opentelemetry is an optional dependency; import lives inside try/except to + keep import-time graceful when otel extras not installed + + - location: ./packages/omniray/omniray/tracing/otel.py:34 + token: '# noqa' + content: 'from opentelemetry.trace import Span as _OtelSpan # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + opentelemetry is an optional dependency; import lives inside try/except to + keep import-time graceful when otel extras not installed + + - location: ./packages/omniray/omniray/tracing/otel.py:35 + token: '# noqa' + content: 'from opentelemetry.trace import Status as _Status # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + opentelemetry is an optional dependency; import lives inside try/except to + keep import-time graceful when otel extras not installed + + - location: ./packages/omniray/omniray/tracing/otel.py:36 + token: '# noqa' + content: 'from opentelemetry.trace import StatusCode as _StatusCode # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + opentelemetry is an optional dependency; import lives inside try/except to + keep import-time graceful when otel extras not installed + + - location: ./packages/omniray/omniray/tracing/profilers.py:49 + token: '# noqa' + content: 'def log_span_success( # noqa: PLR0913' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + log_span_success renders 5 optional metric channels into a single + formatted line; keyword args mirror tracer's metric set + + - location: ./packages/omniray/omniray/tracing/rss.py:18 + token: '# pragma: no cover' + content: 'except ImportError: # pragma: no cover — Windows path' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + stdlib 'resource' module is Unix-only; ImportError only triggers on + Windows where CI doesn't run, so coverage genuinely unreachable + + - location: ./packages/omniray/omniray/tracing/rss.py:36 + token: '# noqa' + content: 'global _PROCESS # noqa: PLW0603 — singleton refreshed on fork (pid change)' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + pre-fork servers (gunicorn/uvicorn workers) need _PROCESS rebound to + worker pid after fork; module-level cache is the right scope here + + - location: ./packages/omniray/omniray/tracing/rss.py:51 + token: '# noqa' + content: 'except Exception: # noqa: BLE001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + tracing must never break the traced app; any psutil failure (permissions, + dead pid, platform quirk) silently degrades to None + + - location: ./packages/omniray/omniray/tracing/rss.py:69 + token: '# noqa' + content: 'except Exception: # noqa: BLE001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + same contract as read_rss_mb: tracing must never break the traced app; any + getrusage failure silently degrades to None + + - location: ./packages/omniray/omniray/tracing/sizing.py:24 + token: '# noqa' + content: 'except Exception: # noqa: BLE001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + tracing must never break the traced app; pympler.asizeof can raise on + cycles or exotic objects, degrade to None + + - location: ./packages/omniray/omniray/tracing/thresholds.py:77 + token: '# noqa' + content: 'def _validate_bool(self, name: str, value: bool | None) -> None: # noqa: FBT001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + internal validation helper called with named kwargs from a dispatch table; + positional bool here is not a public API smell + + - location: ./packages/omniray/omniray/tracing/tracers.py:56 + token: '# noqa' + content: 'def trace( # noqa: PLR0913' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + Tracer.trace is the hot-path entry; 7 keyword-only flag overrides mirror + the public per-trace API (matches trace() decorator and + create_trace_wrapper()) + + - location: ./packages/omniray/omniray/tracing/tracers.py:105 + token: '# type: ignore' + content: 'context = otel_tracer.start_as_current_span(span_name) if flags.otel else NOOP_CONTEXT # type: ignore[union-attr]' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + otel_tracer is Optional[Tracer] for static analysis but guarded above by + 'flags.otel and HAS_OTEL'; mypy can't follow that invariant + + - location: ./packages/omniray/omniray/tracing/tracers.py:106 + token: '# type: ignore' + content: 'with context as span: # type: ignore[union-attr]' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + context is OtelSpan ctx-mgr or NOOP_CONTEXT union; both support __enter__ + but their span types are heterogeneous + + - location: ./packages/omniray/omniray/tracing/tracers.py:113 + token: '# noqa' + content: 'try: # noqa: SIM105 - tracing must never mask user exceptions' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + contextlib.suppress would swallow the user exception being raised; + explicit try/except needed so original 'raise' propagates + + - location: ./packages/omniray/omniray/tracing/tracers.py:117 + token: '# noqa' + content: 'except Exception: # noqa: BLE001, S110' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + logging the failure must not mask the original user exception; silent + swallow is intentional — the user's exception is re-raised on the next + line + + - location: ./packages/omniray/omniray/tracing/tracers.py:133 + token: '# noqa' + content: 'try: # noqa: SIM105 - tracing must never mask user exceptions' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + contextlib.suppress would swallow the user exception being raised; + explicit try/except needed so original 'raise' propagates + + - location: ./packages/omniray/omniray/tracing/tracers.py:135 + token: '# noqa' + content: 'except Exception: # noqa: BLE001, S110' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + logging the failure must not mask the original user exception; silent + swallow is intentional — the user's exception is re-raised on the next + line + + - location: ./packages/omniray/omniray/tracing/tracers.py:148 + token: '# noqa' + content: 'def _finish_tracing( # noqa: PLR0913' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + internal completion plumbing: span identity (name/depth), timing, flags, + and pre-measured input/rss must be passed forward to + log_span_success/compactor + + - location: ./packages/omniray/omniray/tracing/tracers.py:203 + token: '# noqa' + content: 'def _finish_tracing_failure( # noqa: PLR0913' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + internal failure-path plumbing mirrors _finish_tracing's parameter set + plus the exception; splitting would duplicate the call site + + - location: ./packages/omniray/omniray/tracing/tracers.py:265 + token: '# type: ignore' + content: 'span.set_status(Status(StatusCode.ERROR, str(exception))) # type: ignore[misc, union-attr]' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + Status/StatusCode are Optional[type] in OtelConfig but only None when + has_otel=False; this branch is only entered when flags.otel is True + + - location: ./packages/omniray/omniray/tracing/tracers.py:278 + token: '# noqa' + content: 'async def trace( # noqa: PLR0913' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + AsyncTracer.trace mirrors Tracer.trace's 7 keyword-only flag overrides; + signature parity is intentional so caller code is identical sync/async + + - location: ./packages/omniray/omniray/tracing/tracers.py:334 + token: '# noqa' + content: 'try: # noqa: SIM105 - tracing must never mask user exceptions' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + contextlib.suppress would swallow the user exception being raised; + explicit try/except needed so original 'raise' propagates + + - location: ./packages/omniray/omniray/tracing/tracers.py:338 + token: '# noqa' + content: 'except Exception: # noqa: BLE001, S110' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + logging the failure must not mask the original user exception; silent + swallow is intentional — the user's exception is re-raised on the next + line + + - location: ./packages/omniray/omniray/tracing/tracers.py:354 + token: '# noqa' + content: 'try: # noqa: SIM105 - tracing must never mask user exceptions' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + contextlib.suppress would swallow the user exception being raised; + explicit try/except needed so original 'raise' propagates + + - location: ./packages/omniray/omniray/tracing/tracers.py:356 + token: '# noqa' + content: 'except Exception: # noqa: BLE001, S110' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + logging the failure must not mask the original user exception; silent + swallow is intentional — the user's exception is re-raised on the next + line + + - location: ./packages/omniray/omniray/tracing/tracers.py:368 + token: '# noqa' + content: 'from opentelemetry import context as context_api # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + opentelemetry is an optional dependency; lazy import inside otel-only + branch keeps module import-time graceful when extras not installed + + - location: ./packages/omniray/omniray/tracing/tracers.py:369 + token: '# noqa' + content: 'from opentelemetry import trace as trace_api # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + opentelemetry is an optional dependency; lazy import inside otel-only + branch keeps module import-time graceful when extras not installed + + - location: ./packages/omniray/omniray/tracing/tracers.py:372 + token: '# type: ignore' + content: 'span = otel_tracer.start_span(span_name) # type: ignore[union-attr]' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + otel_tracer is Optional[Tracer] for static analysis but guarded by + HAS_OTEL invariant; mypy can't follow that across module boundary + + - location: ./packages/omniray/omniray/tracing/tracers.py:382 + token: '# noqa' + content: 'from opentelemetry import context as context_api # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + opentelemetry is an optional dependency; lazy import inside otel-only + branch keeps module import-time graceful when extras not installed + + - location: ./packages/omniray/omniray/tracing/tracers.py:384 + token: '# type: ignore' + content: 'context_api.detach(token) # type: ignore[arg-type] # Token[Context] stored as object' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + Token[Context] from context_api.attach() is stored as 'object' to keep it + out of public types; detach() needs the original Token type which mypy + lost + + - location: ./packages/omniray/omniray/tracing/tracers.py:385 + token: '# type: ignore' + content: 'span.end() # type: ignore[union-attr]' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + span guaranteed non-None when flags.otel is True; otel branch only entered + after HAS_OTEL guard, mypy can't follow that across helpers + + - location: ./packages/omniray/tests/unit/tracing/test_console.py:12 + token: '# noqa' + content: 'from omniray.tracing.console import logger as console_logger # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test must import logger AFTER setup_console_handler runs so the assertion + observes the post-setup handler list, not module-load state + + - location: ./packages/omniray/tests/unit/tracing/test_console.py:26 + token: '# noqa' + content: 'from omniray.tracing.console import logger as console_logger # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test must import logger AFTER setup_console_handler runs so the assertion + observes the post-setup handler list, not module-load state + + - location: ./packages/omniray/tests/unit/tracing/test_console.py:33 + token: '# noqa' + content: 'import importlib # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + importlib imported inside test so reload happens AFTER mocker.patch() of + CONSOLE_LOG_FLAG; module-level import would resolve flag before patch + + - location: ./packages/omniray/tests/unit/tracing/test_console.py:37 + token: '# noqa' + content: 'import omniray.tracing.tracers # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + module imported inside test so importlib.reload() observes the patched + CONSOLE_LOG_FLAG; module-level import would prime cache with unpatched + value + + - location: ./packages/omniray/tests/unit/tracing/test_thresholds.py:42 + token: '# type: ignore' + content: 'RawThresholds(size="foo") # type: ignore[arg-type]' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test deliberately passes wrong type to assert runtime validation rejects + it; mypy correctly flags the type error we're testing for + + - location: ./packages/omniray/tests/unit/tracing/test_thresholds.py:52 + token: '# type: ignore' + content: 'RawThresholds(size=[1, "bad", 3]) # type: ignore[list-item]' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test deliberately puts wrong-typed element in list to assert runtime + validation rejects it; mypy correctly flags the type error we're testing + for + + - location: ./packages/omniray/tests/unit/tracing/test_thresholds.py:63 + token: '# type: ignore' + content: 'RawThresholds(size_big_tag_mb="foo") # type: ignore[arg-type]' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test deliberately passes wrong type to assert runtime validation rejects + it; mypy correctly flags the type error we're testing for + + - location: ./packages/omniray/tests/unit/tracing/test_thresholds.py:68 + token: '# type: ignore' + content: 'RawThresholds(size_big_tag_mb=True) # type: ignore[arg-type]' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test passes bool to assert it's rejected; bool is a subclass of int so + mypy considers it valid but runtime check rejects it + + - location: ./packages/omniray/tests/unit/tracing/test_thresholds.py:79 + token: '# type: ignore' + content: 'RawThresholds(compact="yes") # type: ignore[arg-type]' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test deliberately passes wrong type to assert runtime validation rejects + it; mypy correctly flags the type error we're testing for + + - location: ./packages/omniray/tests/unit/tracing/test_thresholds.py:97 + token: '# type: ignore' + content: 'RawThresholds(compact_threshold="five") # type: ignore[arg-type]' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test deliberately passes wrong type to assert runtime validation rejects + it; mypy correctly flags the type error we're testing for + + - location: ./packages/omniray/tests/unit/tracing/test_thresholds.py:103 + token: '# type: ignore' + content: 'RawThresholds(compact_threshold=True) # type: ignore[arg-type]' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test passes bool to assert it's rejected; bool is a subclass of int so + mypy considers it valid but runtime check rejects it + + - location: ./packages/omniwrap/omniwrap/markers.py:19 + token: '# noqa' + content: 'func._omniwrap_skip = True # type: ignore[attr-defined] # noqa: SLF001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + _omniwrap_skip is the documented sentinel attribute that wrap_all() + checks; canonical marker name owned by omniwrap, module-private not + type-private + + - location: ./packages/omniwrap/omniwrap/markers.py:19 + token: '# type: ignore' + content: 'func._omniwrap_skip = True # type: ignore[attr-defined] # noqa: SLF001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + plain functions don't declare _omniwrap_skip in their type; attribute set + as runtime marker only + + - location: ./packages/omniwrap/omniwrap/pyproject.py:54 + token: '# noqa' + content: 'except Exception as exc: # noqa: BLE001 — catch any validation failure in __post_init__' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + user-supplied raw config classes can raise anything in their + __post_init__; we degrade gracefully to defaults rather than crashing the + app at import time + + - location: ./packages/omniwrap/omniwrap/pyproject.py:134 + token: '# type: ignore' + content: 'return raw_cls(**{k: v for k, v in data.items() if k in known_keys}) # type: ignore[return-value]' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + is_dataclass narrows raw_cls to DataclassInstance, not the user's T; mypy + can't prove that calling type[T] with kwargs returns T + + - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:64 + token: '# noqa' + content: 'from myapp.service import UserService # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() so wrapping applies; + module-level import would resolve before fixture creates the module + + - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:83 + token: '# noqa' + content: 'from myapp.service import UserService # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:102 + token: '# noqa' + content: 'from myapp.service import UserService # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:120 + token: '# noqa' + content: 'from myapp.service import UserService # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:139 + token: '# noqa' + content: 'from myapp.service import UserService # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:161 + token: '# noqa' + content: 'from myapp.service import Calculator, greet # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:189 + token: '# noqa' + content: 'from myapp.service import UserService # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:190 + token: '# noqa' + content: 'from myapp.utils import Calculator, greet # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:200 + token: '# noqa' + content: 'from myapp.service import expensive, regular # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:216 + token: '# noqa' + content: 'from myapp.service import Service # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:237 + token: '# noqa' + content: 'from myapp.service import decorated, plain # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:253 + token: '# noqa' + content: 'from myapp.service import decorated, plain # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:272 + token: '# noqa' + content: 'from myapp.service import User # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:303 + token: '# noqa' + content: 'from myapp.service import Config # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:325 + token: '# noqa' + content: 'from myapp.service import ConcreteService # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:345 + token: '# noqa' + content: 'from myapp.service import plain, stacked_no_wraps, stacked_with_wraps # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:368 + token: '# noqa' + content: 'from myapp.service import decorated_fetch, plain_fetch # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:387 + token: '# noqa' + content: 'from myapp.service import Service # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:20 + token: '# noqa' + content: 'from myapp.service import greet # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:44 + token: '# noqa' + content: 'from myapp.service import fetch # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:63 + token: '# noqa' + content: 'from myapp.service import greet # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:64 + token: '# noqa' + content: 'from myapp.utils import helper # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:90 + token: '# noqa' + content: 'from myapp.service import greet # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:91 + token: '# noqa' + content: 'from myapp.utils import fetch # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:36 + token: '# noqa' + content: 'from myapp.service import greet # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:53 + token: '# noqa' + content: 'from myapp.service import fetch # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:69 + token: '# noqa' + content: 'from myapp.service import greet # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:94 + token: '# noqa' + content: 'from myapp.service import greet # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:120 + token: '# noqa' + content: 'from myapp.service import Service # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:136 + token: '# noqa' + content: 'from myapp.service import Service as Svc2 # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:36 + token: '# noqa' + content: 'from myapp.service import join, my_func # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:43 + token: '# noqa' + content: 'assert result == os.path.join("/tmp", "file") # noqa: PTH118' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test asserts that the re-exported os.path.join produces the same output as + the stdlib reference; pathlib equivalent would change what's being + compared + + - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:53 + token: '# noqa' + content: 'from myapp.service import process # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:65 + token: '# noqa' + content: 'from myapp.service import basename, transform # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:91 + token: '# noqa' + content: 'from myapp.service import helper as imported_helper # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:92 + token: '# noqa' + content: 'from myapp.service import process # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:93 + token: '# noqa' + content: 'from myapp.utils import helper # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:34 + token: '# noqa' + content: 'from myapp.service import greet # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:65 + token: '# noqa' + content: 'from myapp.service import fetch # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:83 + token: '# noqa' + content: 'from myapp.service import fetch, greet # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:149 + token: '# noqa' + content: 'from myapp.service import fetch # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:153 + token: '# noqa' + content: 'from myapp.service import greet # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:172 + token: '# noqa' + content: 'from myapp.service import greet # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:71 + token: '# noqa' + content: 'from myapp.service import Service, ServiceError # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:75 + token: '# noqa' + content: 'raise ServiceError("test error") # noqa: EM101, TRY003, TRY301' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + throwaway exception raised inside try block to verify wrap_all leaves + exception classes alone; production-style exception design (EM101/TRY003) + doesn't apply to a one-line test fixture + + - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:90 + token: '# noqa' + content: 'from myapp.service import Service # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:94 + token: '# noqa' + content: 'raise Service.NotFoundError("not found") # noqa: EM101, TRY003, TRY301' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + throwaway exception raised inside try block to verify wrap_all leaves + exception classes alone; production-style exception design (EM101/TRY003) + doesn't apply to a one-line test fixture + + - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:109 + token: '# noqa' + content: 'from myapp.service import FatalError, Service # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:112 + token: '# noqa' + content: 'raise FatalError("fatal") # noqa: EM101, TRY301' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + throwaway exception raised inside try block to verify wrap_all leaves + exception classes alone; production-style exception design (EM101/TRY003) + doesn't apply to a one-line test fixture + + - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:126 + token: '# noqa' + content: 'from myapp.service import Service # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:158 + token: '# noqa' + content: 'from myapp.service import TimeoutError as SvcTimeout # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:159 + token: '# noqa' + content: 'from myapp.service import fetch, validate # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:163 + token: '# noqa' + content: 'raise SvcTimeout("timed out") # noqa: EM101, TRY003, TRY301' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + throwaway exception raised inside try block to verify wrap_all leaves + exception classes alone; production-style exception design (EM101/TRY003) + doesn't apply to a one-line test fixture + + - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_config.py:46 + token: '# noqa' + content: 'from myapp.service import Conversation, Message # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_config.py:76 + token: '# noqa' + content: 'from myapp.service import Model # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_config.py:96 + token: '# noqa' + content: 'from myapp.service import Conversation # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_config.py:147 + token: '# noqa' + content: 'from myapp.service import Service # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_config.py:173 + token: '# noqa' + content: 'from myapp.service import healthcheck, process # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:83 + token: '# noqa' + content: 'from myapp.service import healthcheck, process # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:103 + token: '# noqa' + content: 'from myapp.service import fetch, healthcheck # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:118 + token: '# noqa' + content: 'from myapp.service import Service # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:135 + token: '# noqa' + content: 'from myapp.service import Internal, Public # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:150 + token: '# noqa' + content: 'from myapp.service import Service, ServiceError, healthcheck # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test imports target module AFTER wrap_all() runs against the + fixture-created module; module-level import would resolve before wrapping + is applied + + - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:154 + token: '# noqa' + content: 'raise ServiceError("err") # noqa: EM101, TRY301' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + throwaway exception raised inside try block to verify wrap_all leaves + exception classes alone; production-style exception design (EM101/TRY003) + doesn't apply to a one-line test fixture + + - location: ./packages/omniwrap/tests/unit/test_performance.py:15 + token: '# noqa' + content: 'def _noop_wrapper(wrapped, instance, args, kwargs): # noqa: ARG001' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + noop wrapper conforms to wrapt's (wrapped, instance, args, kwargs) + protocol; 'instance' is unused here on purpose to measure pure delegation + overhead + + - location: ./packages/omniwrap/tests/unit/wrapper/test_is_defined_in_module.py:33 + token: '# noqa' + content: 'f = lambda: None # noqa: E731' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test specifically targets lambda handling in _is_defined_in_module; + converting to def would no longer exercise the lambda code path + + - location: ./packages/omniwrap/tests/unit/wrapper/test_is_defined_in_module.py:61 + token: '# noqa' + content: 'f = lambda: None # noqa: E731' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + test specifically targets lambda handling in _is_defined_in_module; + converting to def would no longer exercise the lambda code path diff --git a/uv.lock b/uv.lock index 65e3e1a..b3949dc 100644 --- a/uv.lock +++ b/uv.lock @@ -639,6 +639,7 @@ dev = [ { name = "pytest-cov" }, { name = "pytest-mock" }, { name = "ruff" }, + { name = "shamefile" }, { name = "types-psutil" }, ] docs = [ @@ -658,6 +659,7 @@ requires-dist = [ { name = "pytest-cov", marker = "extra == 'dev'", specifier = ">=6.0" }, { name = "pytest-mock", marker = "extra == 'dev'", specifier = ">=3.14" }, { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.12" }, + { name = "shamefile", marker = "extra == 'dev'", specifier = ">=0.1.6" }, { name = "types-psutil", marker = "extra == 'dev'", specifier = ">=7.0" }, ] provides-extras = ["dev", "docs"] @@ -1152,6 +1154,22 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/63/b6/aeadee5443e49baa2facd51131159fd6301cc4ccfc1541e4df7b021c37dd/ruff-0.15.11-py3-none-win_arm64.whl", hash = "sha256:063fed18cc1bbe0ee7393957284a6fe8b588c6a406a285af3ee3f46da2391ee4", size = 11032614, upload-time = "2026-04-16T18:46:34.487Z" }, ] +[[package]] +name = "shamefile" +version = "0.1.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d0/62/fe6acd943afe43be4fbf879ce9be7787c9ef98851dd9e4db73c43354f869/shamefile-0.1.6.tar.gz", hash = "sha256:e735c43daec628ddda44d6244251e7d252aeea4dc8ff00d8bb069552b6eefde1", size = 790263, upload-time = "2026-05-16T22:43:31.446Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/38/25/1a87116a4f73a1382c4c47792973a064f036bd5ea4c2575aee661ce4b4c5/shamefile-0.1.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:99de3466cf74865f89c15c70c3f4125671604374a4d0a61e9699ca4d3773a263", size = 1824222, upload-time = "2026-05-16T22:43:14.756Z" }, + { url = "https://files.pythonhosted.org/packages/4e/8b/61f8bbe69f034eaa22185e08d30c28b7df06bd2188389c2ea22f69b63bd0/shamefile-0.1.6-py3-none-macosx_11_0_arm64.whl", hash = "sha256:5fe45cb51c1fd480cc6656272c29341bdf46b86a9820ea36fe53fefa3f2d01ee", size = 1773425, upload-time = "2026-05-16T22:43:16.989Z" }, + { url = "https://files.pythonhosted.org/packages/4a/9f/27095d496d168427d424f01e4a95793a8da122ecb66e2ff077cfbe17de07/shamefile-0.1.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0de5713e2ce930a1509530144a92d7d43cc7266887ac99b10cf25676f9664e47", size = 1801119, upload-time = "2026-05-16T22:43:19.824Z" }, + { url = "https://files.pythonhosted.org/packages/ed/ba/19a142ab1e3835d93865c4394816df11fbe5fb9355b47be5d3fe6bfcded0/shamefile-0.1.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6adf4c90cce8eb5e90d2f98269638fff9162ebd66e327a0a51d954df502637fb", size = 1895708, upload-time = "2026-05-16T22:43:22.205Z" }, + { url = "https://files.pythonhosted.org/packages/6e/ea/85d56504961d36aa330053c6cf0525161d989f875d799ca33f6f8d34b8e9/shamefile-0.1.6-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:37ded954dfb5fb2a060e02df78aa9d215664e58d0a3e5b7e1bf1bf4b4e22f6c5", size = 1804668, upload-time = "2026-05-16T22:43:23.894Z" }, + { url = "https://files.pythonhosted.org/packages/0c/8b/533ab9123cf65d4f4421181b8cdba1326a16d7dba0d07eff267f0b29f06e/shamefile-0.1.6-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:7e9fd1fa29f9440cbe42ded0ec03ca412b19e361fffb68f98c084eb513d22aca", size = 1967241, upload-time = "2026-05-16T22:43:26.132Z" }, + { url = "https://files.pythonhosted.org/packages/eb/4d/9a1295b5fe72bfd40f32d71d57a398e8aa05a97df9cc8a17b589823a242c/shamefile-0.1.6-py3-none-win_amd64.whl", hash = "sha256:ab5b1d86446e4c6e16f713a7c023e7937f621db66e01a099ee4072b1053d3ed8", size = 1775921, upload-time = "2026-05-16T22:43:27.772Z" }, + { url = "https://files.pythonhosted.org/packages/1c/79/9319e504e7c6ba3563725a5819ca87eb07ff434145c6c53501b93fa02b2d/shamefile-0.1.6-py3-none-win_arm64.whl", hash = "sha256:eb11130958e3149d5d01f0775091dbd47ce8795e7e052264ac7765d05ebe4533", size = 1679707, upload-time = "2026-05-16T22:43:29.585Z" }, +] + [[package]] name = "six" version = "1.17.0" From 99faf131674d0e16e9f1f83c74367b2a36c72b9a Mon Sep 17 00:00:00 2001 From: Bartlomiej Flis Date: Sun, 17 May 2026 14:20:45 +0200 Subject: [PATCH 2/7] chore: pin shamefile pre-commit hook to v0.1.6 Mutable ref (main) is never updated after first install per pre-commit docs. Co-Authored-By: Claude Opus 4.7 (1M context) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2a1a88f..0f8baf2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,6 +26,6 @@ repos: exclude: tests/ - repo: https://github.com/BKDDFS/shamefile - rev: main + rev: v0.1.6 hooks: - id: shamefile From 243f016b1b40c3f4c1511f904929efd5f55bde8c Mon Sep 17 00:00:00 2001 From: Bartlomiej Flis Date: Sun, 17 May 2026 14:25:35 +0200 Subject: [PATCH 3/7] docs: add shamefile tracking badge to README Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 545c411..ca886bb 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ [![Python](https://img.shields.io/pypi/pyversions/omniray)](https://pypi.org/project/omniray/) [![Docs](https://img.shields.io/badge/docs-blue)](https://omniviser.github.io/omniray/) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +[![shamefile](https://img.shields.io/badge/tracked_with-shamefile-fe3434)](https://github.com/BKDDFS/shamefile) **One call, and you see everything that's happening in your code.** From 1c14a246bc8aafe544b2830d1d56bff36942e8bf Mon Sep 17 00:00:00 2001 From: Bartlomiej Flis Date: Sun, 17 May 2026 18:40:44 +0200 Subject: [PATCH 4/7] chore: bump shamefile to 0.1.7 Co-Authored-By: Claude Opus 4.7 (1M context) --- .pre-commit-config.yaml | 2 +- pyproject.toml | 2 +- uv.lock | 26 +++++++++++++------------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0f8baf2..8839dab 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,6 +26,6 @@ repos: exclude: tests/ - repo: https://github.com/BKDDFS/shamefile - rev: v0.1.6 + rev: v0.1.7 hooks: - id: shamefile diff --git a/pyproject.toml b/pyproject.toml index 01a7aa6..b98649d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ dev = [ "mypy>=1.15", "types-psutil>=7.0", "pip-licenses>=5.0", - "shamefile>=0.1.6", + "shamefile>=0.1.7", ] docs = [ "mkdocs-material>=9.0", diff --git a/uv.lock b/uv.lock index b3949dc..0b69a05 100644 --- a/uv.lock +++ b/uv.lock @@ -659,7 +659,7 @@ requires-dist = [ { name = "pytest-cov", marker = "extra == 'dev'", specifier = ">=6.0" }, { name = "pytest-mock", marker = "extra == 'dev'", specifier = ">=3.14" }, { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.12" }, - { name = "shamefile", marker = "extra == 'dev'", specifier = ">=0.1.6" }, + { name = "shamefile", marker = "extra == 'dev'", specifier = ">=0.1.7" }, { name = "types-psutil", marker = "extra == 'dev'", specifier = ">=7.0" }, ] provides-extras = ["dev", "docs"] @@ -1156,18 +1156,18 @@ wheels = [ [[package]] name = "shamefile" -version = "0.1.6" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d0/62/fe6acd943afe43be4fbf879ce9be7787c9ef98851dd9e4db73c43354f869/shamefile-0.1.6.tar.gz", hash = "sha256:e735c43daec628ddda44d6244251e7d252aeea4dc8ff00d8bb069552b6eefde1", size = 790263, upload-time = "2026-05-16T22:43:31.446Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/38/25/1a87116a4f73a1382c4c47792973a064f036bd5ea4c2575aee661ce4b4c5/shamefile-0.1.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:99de3466cf74865f89c15c70c3f4125671604374a4d0a61e9699ca4d3773a263", size = 1824222, upload-time = "2026-05-16T22:43:14.756Z" }, - { url = "https://files.pythonhosted.org/packages/4e/8b/61f8bbe69f034eaa22185e08d30c28b7df06bd2188389c2ea22f69b63bd0/shamefile-0.1.6-py3-none-macosx_11_0_arm64.whl", hash = "sha256:5fe45cb51c1fd480cc6656272c29341bdf46b86a9820ea36fe53fefa3f2d01ee", size = 1773425, upload-time = "2026-05-16T22:43:16.989Z" }, - { url = "https://files.pythonhosted.org/packages/4a/9f/27095d496d168427d424f01e4a95793a8da122ecb66e2ff077cfbe17de07/shamefile-0.1.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0de5713e2ce930a1509530144a92d7d43cc7266887ac99b10cf25676f9664e47", size = 1801119, upload-time = "2026-05-16T22:43:19.824Z" }, - { url = "https://files.pythonhosted.org/packages/ed/ba/19a142ab1e3835d93865c4394816df11fbe5fb9355b47be5d3fe6bfcded0/shamefile-0.1.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6adf4c90cce8eb5e90d2f98269638fff9162ebd66e327a0a51d954df502637fb", size = 1895708, upload-time = "2026-05-16T22:43:22.205Z" }, - { url = "https://files.pythonhosted.org/packages/6e/ea/85d56504961d36aa330053c6cf0525161d989f875d799ca33f6f8d34b8e9/shamefile-0.1.6-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:37ded954dfb5fb2a060e02df78aa9d215664e58d0a3e5b7e1bf1bf4b4e22f6c5", size = 1804668, upload-time = "2026-05-16T22:43:23.894Z" }, - { url = "https://files.pythonhosted.org/packages/0c/8b/533ab9123cf65d4f4421181b8cdba1326a16d7dba0d07eff267f0b29f06e/shamefile-0.1.6-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:7e9fd1fa29f9440cbe42ded0ec03ca412b19e361fffb68f98c084eb513d22aca", size = 1967241, upload-time = "2026-05-16T22:43:26.132Z" }, - { url = "https://files.pythonhosted.org/packages/eb/4d/9a1295b5fe72bfd40f32d71d57a398e8aa05a97df9cc8a17b589823a242c/shamefile-0.1.6-py3-none-win_amd64.whl", hash = "sha256:ab5b1d86446e4c6e16f713a7c023e7937f621db66e01a099ee4072b1053d3ed8", size = 1775921, upload-time = "2026-05-16T22:43:27.772Z" }, - { url = "https://files.pythonhosted.org/packages/1c/79/9319e504e7c6ba3563725a5819ca87eb07ff434145c6c53501b93fa02b2d/shamefile-0.1.6-py3-none-win_arm64.whl", hash = "sha256:eb11130958e3149d5d01f0775091dbd47ce8795e7e052264ac7765d05ebe4533", size = 1679707, upload-time = "2026-05-16T22:43:29.585Z" }, +version = "0.1.7" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/01/5c/85217703cba173f8deffd5e4decbb9da34a4710c4ac582b6e68526b75140/shamefile-0.1.7.tar.gz", hash = "sha256:f52d4a1f38bb3e6624932c42ff2094b9c7c7fe540a72cc22f69a8218ba2726af", size = 792310, upload-time = "2026-05-17T16:26:39.709Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a8/2a/91a01f33b36e4434a969a18b3b08186fb8d9d67956a27a03e4e95730f53f/shamefile-0.1.7-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:77dc887d85beb90b7cc4f80618fe7432e740c7562d1d44162a7fff2d28c0587f", size = 1821885, upload-time = "2026-05-17T16:26:25.076Z" }, + { url = "https://files.pythonhosted.org/packages/3e/24/18367b8d3f555e4bcdd1813ba19e5dd5ac8a2a09bf71690843d8bf779102/shamefile-0.1.7-py3-none-macosx_11_0_arm64.whl", hash = "sha256:5f8bdb72b891bda65dc35d8bbc73189ac292bbc78c78d70265390b261f5b0b45", size = 1772122, upload-time = "2026-05-17T16:26:27.267Z" }, + { url = "https://files.pythonhosted.org/packages/74/9e/a59cd030a80189fd11bc4eb01ea9f73b680b44bce68b68babf461dee8cb6/shamefile-0.1.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b3aeddd55b3bfc0d426ceaf0ba32b9e0f8b7a21c517592d691c1ab8ff9c48bc1", size = 1800157, upload-time = "2026-05-17T16:26:29.314Z" }, + { url = "https://files.pythonhosted.org/packages/5c/e3/53fa519b069977cfd8e5a85576c440b90bb18401a75bbc750f282d187453/shamefile-0.1.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b5b38afce4d65e8ea0a42bba1fe7e7c89acb0ff3773a780cf0d6aa73c62d10d", size = 1894528, upload-time = "2026-05-17T16:26:30.771Z" }, + { url = "https://files.pythonhosted.org/packages/05/23/ad16650639a265066300b1e3ba2d5dd649e9721eb4b83132fa20c3fbb89f/shamefile-0.1.7-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:091b0e4c745e628ecf69d3c531fa0cf1851062ad2c892009a57c47ebf8b5ac41", size = 1803992, upload-time = "2026-05-17T16:26:32.743Z" }, + { url = "https://files.pythonhosted.org/packages/bb/ba/5b12704f34329e978964caf11ef06addf80b240aeb4172be47301b20f56f/shamefile-0.1.7-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:a0e6faaad3e44b25f0e0101a6c47d2c9ca1f99e9fba6d148170a5a0598d546d4", size = 1964758, upload-time = "2026-05-17T16:26:34.689Z" }, + { url = "https://files.pythonhosted.org/packages/13/9d/f1319810845585410d69620f351294508f2d0fdb35c0cdf8dd554b0ec9de/shamefile-0.1.7-py3-none-win_amd64.whl", hash = "sha256:1b336e2e607c600299b81c98e0aeb57daac763deec8934d7a584491ab23b0453", size = 1776444, upload-time = "2026-05-17T16:26:36.931Z" }, + { url = "https://files.pythonhosted.org/packages/9d/f2/b18eef95b1a498212aff6d065955731e96d1f39164ba6975821808b6cb2b/shamefile-0.1.7-py3-none-win_arm64.whl", hash = "sha256:ec63f45a4c72bcd574f5c0b20807c913636610da88b934d24eaeac96d0bc8ba2", size = 1679572, upload-time = "2026-05-17T16:26:38.378Z" }, ] [[package]] From 1a5504c8cb0aa3ead5a972dde85da7c0d8f77651 Mon Sep 17 00:00:00 2001 From: Bartlomiej Flis Date: Sun, 17 May 2026 19:03:29 +0200 Subject: [PATCH 5/7] chore: tighten shamefile why fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - fix 3 inaccurate reasons (bench dict not lru_cache, test_console importlib ordering, tracers otel imports in `if` not try/except) - rewrite 4 SIM105 reasons in tracers — contextlib.suppress wouldn't swallow the user exception; real driver is readability inside the nested handler - shorten the most repeated reasons (PLC0415 e2e tests, SLF001 profilers helpers, otel optional-extra imports, throwaway test exceptions, BLE001 tracing degradation) - unify _omniwrap_skip SLF001 wording across markers + decorators Co-Authored-By: Claude Opus 4.7 (1M context) --- shamefile.yaml | 460 +++++++++++++------------------------------------ 1 file changed, 122 insertions(+), 338 deletions(-) diff --git a/shamefile.yaml b/shamefile.yaml index 77f5b8e..b85b92a 100644 --- a/shamefile.yaml +++ b/shamefile.yaml @@ -9,8 +9,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - benchmark needs to reset internal lru_cache between runs; no public API - exposes that singleton + benchmark resets internal flags singleton dict between scenarios; no + public reset API - location: ./benchmarks/bench_tracer_overhead.py:91 token: '# noqa' @@ -18,8 +18,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - benchmark keeps stream open for lifetime of run; context manager would - skew timings + benchmark keeps fd open and uses os.devnull/plain open for parity with + production stream handling; context manager + pathlib would skew timings - location: ./examples/big_red_button/__main__.py:12 token: '# noqa' @@ -72,8 +72,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - _omniwrap_skip is omniwrap's documented sentinel attribute for opting out - of auto-wrap; cross-package contract, not encapsulation violation + _omniwrap_skip: documented sentinel attribute that wrap_all() honors; + module-private not type-private - location: ./packages/omniray/omniray/decorators.py:25 token: '# type: ignore' @@ -146,8 +146,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - profilers._colored is the package-internal color helper reused across - tracing modules; module-private not type-private + profilers helper reused across tracing modules; module-private not + type-private - location: ./packages/omniray/omniray/tracing/compactor.py:271 token: '# noqa' @@ -155,8 +155,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - _bucket_color is a package-internal duration coloring helper shared across - tracing modules; module-private not type-private + profilers helper reused across tracing modules; module-private not + type-private - location: ./packages/omniray/omniray/tracing/compactor.py:272 token: '# noqa' @@ -164,8 +164,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - profilers._colored is the package-internal color helper reused across - tracing modules; module-private not type-private + profilers helper reused across tracing modules; module-private not + type-private - location: ./packages/omniray/omniray/tracing/compactor.py:279 token: '# noqa' @@ -173,8 +173,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - _format_mb is profilers' package-internal size formatter shared across - tracing output paths; module-private not type-private + profilers helper reused across tracing modules; module-private not + type-private - location: ./packages/omniray/omniray/tracing/compactor.py:281 token: '# noqa' @@ -182,8 +182,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - _format_mb is profilers' package-internal size formatter shared across - tracing output paths; module-private not type-private + profilers helper reused across tracing modules; module-private not + type-private - location: ./packages/omniray/omniray/tracing/compactor.py:283 token: '# noqa' @@ -191,8 +191,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - _format_mb is profilers' package-internal size formatter shared across - tracing output paths; module-private not type-private + profilers helper reused across tracing modules; module-private not + type-private - location: ./packages/omniray/omniray/tracing/compactor.py:287 token: '# noqa' @@ -200,8 +200,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - _format_mb is profilers' package-internal size formatter shared across - tracing output paths; module-private not type-private + profilers helper reused across tracing modules; module-private not + type-private - location: ./packages/omniray/omniray/tracing/compactor.py:292 token: '# noqa' @@ -209,8 +209,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - _format_mb is profilers' package-internal size formatter shared across - tracing output paths; module-private not type-private + profilers helper reused across tracing modules; module-private not + type-private - location: ./packages/omniray/omniray/tracing/flags.py:49 token: '# noqa' @@ -235,45 +235,35 @@ entries: content: 'from opentelemetry import trace as api # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - opentelemetry is an optional dependency; import lives inside try/except to - keep import-time graceful when otel extras not installed + why: 'otel is an optional extra; import inside try/except' - location: ./packages/omniray/omniray/tracing/otel.py:33 token: '# noqa' content: 'from opentelemetry.trace import INVALID_SPAN # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - opentelemetry is an optional dependency; import lives inside try/except to - keep import-time graceful when otel extras not installed + why: 'otel is an optional extra; import inside try/except' - location: ./packages/omniray/omniray/tracing/otel.py:34 token: '# noqa' content: 'from opentelemetry.trace import Span as _OtelSpan # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - opentelemetry is an optional dependency; import lives inside try/except to - keep import-time graceful when otel extras not installed + why: 'otel is an optional extra; import inside try/except' - location: ./packages/omniray/omniray/tracing/otel.py:35 token: '# noqa' content: 'from opentelemetry.trace import Status as _Status # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - opentelemetry is an optional dependency; import lives inside try/except to - keep import-time graceful when otel extras not installed + why: 'otel is an optional extra; import inside try/except' - location: ./packages/omniray/omniray/tracing/otel.py:36 token: '# noqa' content: 'from opentelemetry.trace import StatusCode as _StatusCode # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - opentelemetry is an optional dependency; import lives inside try/except to - keep import-time graceful when otel extras not installed + why: 'otel is an optional extra; import inside try/except' - location: ./packages/omniray/omniray/tracing/profilers.py:49 token: '# noqa' @@ -307,27 +297,21 @@ entries: content: 'except Exception: # noqa: BLE001' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - tracing must never break the traced app; any psutil failure (permissions, - dead pid, platform quirk) silently degrades to None + why: 'tracing must never break the traced app; degrade silently to None' - location: ./packages/omniray/omniray/tracing/rss.py:69 token: '# noqa' content: 'except Exception: # noqa: BLE001' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - same contract as read_rss_mb: tracing must never break the traced app; any - getrusage failure silently degrades to None + why: 'tracing must never break the traced app; degrade silently to None' - location: ./packages/omniray/omniray/tracing/sizing.py:24 token: '# noqa' content: 'except Exception: # noqa: BLE001' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - tracing must never break the traced app; pympler.asizeof can raise on - cycles or exotic objects, degrade to None + why: 'tracing must never break the traced app; degrade silently to None' - location: ./packages/omniray/omniray/tracing/thresholds.py:77 token: '# noqa' @@ -372,18 +356,15 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - contextlib.suppress would swallow the user exception being raised; - explicit try/except needed so original 'raise' propagates + explicit try/except chosen over contextlib.suppress for readability inside + nested exception handler - location: ./packages/omniray/omniray/tracing/tracers.py:117 token: '# noqa' content: 'except Exception: # noqa: BLE001, S110' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - logging the failure must not mask the original user exception; silent - swallow is intentional — the user's exception is re-raised on the next - line + why: 'logging the failure must not mask the user exception re-raised below' - location: ./packages/omniray/omniray/tracing/tracers.py:133 token: '# noqa' @@ -391,18 +372,15 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - contextlib.suppress would swallow the user exception being raised; - explicit try/except needed so original 'raise' propagates + explicit try/except chosen over contextlib.suppress for readability inside + nested exception handler - location: ./packages/omniray/omniray/tracing/tracers.py:135 token: '# noqa' content: 'except Exception: # noqa: BLE001, S110' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - logging the failure must not mask the original user exception; silent - swallow is intentional — the user's exception is re-raised on the next - line + why: 'logging the failure must not mask the user exception re-raised below' - location: ./packages/omniray/omniray/tracing/tracers.py:148 token: '# noqa' @@ -447,18 +425,15 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - contextlib.suppress would swallow the user exception being raised; - explicit try/except needed so original 'raise' propagates + explicit try/except chosen over contextlib.suppress for readability inside + nested exception handler - location: ./packages/omniray/omniray/tracing/tracers.py:338 token: '# noqa' content: 'except Exception: # noqa: BLE001, S110' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - logging the failure must not mask the original user exception; silent - swallow is intentional — the user's exception is re-raised on the next - line + why: 'logging the failure must not mask the user exception re-raised below' - location: ./packages/omniray/omniray/tracing/tracers.py:354 token: '# noqa' @@ -466,36 +441,29 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - contextlib.suppress would swallow the user exception being raised; - explicit try/except needed so original 'raise' propagates + explicit try/except chosen over contextlib.suppress for readability inside + nested exception handler - location: ./packages/omniray/omniray/tracing/tracers.py:356 token: '# noqa' content: 'except Exception: # noqa: BLE001, S110' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - logging the failure must not mask the original user exception; silent - swallow is intentional — the user's exception is re-raised on the next - line + why: 'logging the failure must not mask the user exception re-raised below' - location: ./packages/omniray/omniray/tracing/tracers.py:368 token: '# noqa' content: 'from opentelemetry import context as context_api # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - opentelemetry is an optional dependency; lazy import inside otel-only - branch keeps module import-time graceful when extras not installed + why: 'otel is an optional extra; lazy import inside the otel-only branch' - location: ./packages/omniray/omniray/tracing/tracers.py:369 token: '# noqa' content: 'from opentelemetry import trace as trace_api # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - opentelemetry is an optional dependency; lazy import inside otel-only - branch keeps module import-time graceful when extras not installed + why: 'otel is an optional extra; lazy import inside the otel-only branch' - location: ./packages/omniray/omniray/tracing/tracers.py:372 token: '# type: ignore' @@ -511,9 +479,7 @@ entries: content: 'from opentelemetry import context as context_api # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - opentelemetry is an optional dependency; lazy import inside otel-only - branch keeps module import-time graceful when extras not installed + why: 'otel is an optional extra; lazy import inside the otel-only branch' - location: ./packages/omniray/omniray/tracing/tracers.py:384 token: '# type: ignore' @@ -540,8 +506,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - test must import logger AFTER setup_console_handler runs so the assertion - observes the post-setup handler list, not module-load state + logger imported after setup_console_handler() so handler list reflects + post-setup state - location: ./packages/omniray/tests/unit/tracing/test_console.py:26 token: '# noqa' @@ -549,17 +515,15 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - test must import logger AFTER setup_console_handler runs so the assertion - observes the post-setup handler list, not module-load state + logger imported after setup_console_handler() so handler list reflects + post-setup state - location: ./packages/omniray/tests/unit/tracing/test_console.py:33 token: '# noqa' content: 'import importlib # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - importlib imported inside test so reload happens AFTER mocker.patch() of - CONSOLE_LOG_FLAG; module-level import would resolve flag before patch + why: 'importlib kept local; only used here for the reload() call below' - location: ./packages/omniray/tests/unit/tracing/test_console.py:37 token: '# noqa' @@ -567,9 +531,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - module imported inside test so importlib.reload() observes the patched - CONSOLE_LOG_FLAG; module-level import would prime cache with unpatched - value + module imported inside test so fresh load happens after CONSOLE_LOG_FLAG + patch - location: ./packages/omniray/tests/unit/tracing/test_thresholds.py:42 token: '# type: ignore' @@ -641,9 +604,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - _omniwrap_skip is the documented sentinel attribute that wrap_all() - checks; canonical marker name owned by omniwrap, module-private not - type-private + _omniwrap_skip: documented sentinel attribute that wrap_all() honors; + module-private not type-private - location: ./packages/omniwrap/omniwrap/markers.py:19 token: '# type: ignore' @@ -678,309 +640,217 @@ entries: content: 'from myapp.service import UserService # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() so wrapping applies; - module-level import would resolve before fixture creates the module + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:83 token: '# noqa' content: 'from myapp.service import UserService # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:102 token: '# noqa' content: 'from myapp.service import UserService # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:120 token: '# noqa' content: 'from myapp.service import UserService # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:139 token: '# noqa' content: 'from myapp.service import UserService # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:161 token: '# noqa' content: 'from myapp.service import Calculator, greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:189 token: '# noqa' content: 'from myapp.service import UserService # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:190 token: '# noqa' content: 'from myapp.utils import Calculator, greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:200 token: '# noqa' content: 'from myapp.service import expensive, regular # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:216 token: '# noqa' content: 'from myapp.service import Service # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:237 token: '# noqa' content: 'from myapp.service import decorated, plain # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:253 token: '# noqa' content: 'from myapp.service import decorated, plain # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:272 token: '# noqa' content: 'from myapp.service import User # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:303 token: '# noqa' content: 'from myapp.service import Config # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:325 token: '# noqa' content: 'from myapp.service import ConcreteService # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:345 token: '# noqa' content: 'from myapp.service import plain, stacked_no_wraps, stacked_with_wraps # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:368 token: '# noqa' content: 'from myapp.service import decorated_fetch, plain_fetch # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:387 token: '# noqa' content: 'from myapp.service import Service # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:20 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:44 token: '# noqa' content: 'from myapp.service import fetch # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:63 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:64 token: '# noqa' content: 'from myapp.utils import helper # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:90 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:91 token: '# noqa' content: 'from myapp.utils import fetch # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:36 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:53 token: '# noqa' content: 'from myapp.service import fetch # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:69 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:94 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:120 token: '# noqa' content: 'from myapp.service import Service # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:136 token: '# noqa' content: 'from myapp.service import Service as Svc2 # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:36 token: '# noqa' content: 'from myapp.service import join, my_func # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:43 token: '# noqa' @@ -997,120 +867,84 @@ entries: content: 'from myapp.service import process # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:65 token: '# noqa' content: 'from myapp.service import basename, transform # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:91 token: '# noqa' content: 'from myapp.service import helper as imported_helper # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:92 token: '# noqa' content: 'from myapp.service import process # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:93 token: '# noqa' content: 'from myapp.utils import helper # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:34 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:65 token: '# noqa' content: 'from myapp.service import fetch # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:83 token: '# noqa' content: 'from myapp.service import fetch, greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:149 token: '# noqa' content: 'from myapp.service import fetch # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:153 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:172 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:71 token: '# noqa' content: 'from myapp.service import Service, ServiceError # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:75 token: '# noqa' @@ -1118,19 +952,15 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - throwaway exception raised inside try block to verify wrap_all leaves - exception classes alone; production-style exception design (EM101/TRY003) - doesn't apply to a one-line test fixture + throwaway test exception inside try/except; production exception style + doesn't apply - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:90 token: '# noqa' content: 'from myapp.service import Service # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:94 token: '# noqa' @@ -1138,19 +968,15 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - throwaway exception raised inside try block to verify wrap_all leaves - exception classes alone; production-style exception design (EM101/TRY003) - doesn't apply to a one-line test fixture + throwaway test exception inside try/except; production exception style + doesn't apply - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:109 token: '# noqa' content: 'from myapp.service import FatalError, Service # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:112 token: '# noqa' @@ -1158,39 +984,29 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - throwaway exception raised inside try block to verify wrap_all leaves - exception classes alone; production-style exception design (EM101/TRY003) - doesn't apply to a one-line test fixture + throwaway test exception inside try/except; production exception style + doesn't apply - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:126 token: '# noqa' content: 'from myapp.service import Service # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:158 token: '# noqa' content: 'from myapp.service import TimeoutError as SvcTimeout # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:159 token: '# noqa' content: 'from myapp.service import fetch, validate # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:163 token: '# noqa' @@ -1198,109 +1014,78 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - throwaway exception raised inside try block to verify wrap_all leaves - exception classes alone; production-style exception design (EM101/TRY003) - doesn't apply to a one-line test fixture + throwaway test exception inside try/except; production exception style + doesn't apply - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_config.py:46 token: '# noqa' content: 'from myapp.service import Conversation, Message # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_config.py:76 token: '# noqa' content: 'from myapp.service import Model # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_config.py:96 token: '# noqa' content: 'from myapp.service import Conversation # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_config.py:147 token: '# noqa' content: 'from myapp.service import Service # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_config.py:173 token: '# noqa' content: 'from myapp.service import healthcheck, process # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:83 token: '# noqa' content: 'from myapp.service import healthcheck, process # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:103 token: '# noqa' content: 'from myapp.service import fetch, healthcheck # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:118 token: '# noqa' content: 'from myapp.service import Service # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:135 token: '# noqa' content: 'from myapp.service import Internal, Public # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:150 token: '# noqa' content: 'from myapp.service import Service, ServiceError, healthcheck # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - test imports target module AFTER wrap_all() runs against the - fixture-created module; module-level import would resolve before wrapping - is applied + why: 'module imported after fixture builds it and wrap_all() runs' - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:154 token: '# noqa' @@ -1308,9 +1093,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - throwaway exception raised inside try block to verify wrap_all leaves - exception classes alone; production-style exception design (EM101/TRY003) - doesn't apply to a one-line test fixture + throwaway test exception inside try/except; production exception style + doesn't apply - location: ./packages/omniwrap/tests/unit/test_performance.py:15 token: '# noqa' From 336a9c1df7169abe1431d7e22f7858f4ca292d19 Mon Sep 17 00:00:00 2001 From: Bartlomiej Flis Date: Sun, 17 May 2026 19:15:09 +0200 Subject: [PATCH 6/7] chore: rewrite every shamefile why to explain DLACZEGO MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each entry now states the design tradeoff that makes the suppression the right call, not just what the code does. Average why length dropped 85→74 chars. Co-Authored-By: Claude Opus 4.7 (1M context) --- shamefile.yaml | 527 ++++++++++++++++++++++++++++--------------------- 1 file changed, 306 insertions(+), 221 deletions(-) diff --git a/shamefile.yaml b/shamefile.yaml index b85b92a..a70f2b2 100644 --- a/shamefile.yaml +++ b/shamefile.yaml @@ -9,8 +9,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - benchmark resets internal flags singleton dict between scenarios; no - public reset API + exposing a public reset API would widen the lib surface for one benchmark + call-site - location: ./benchmarks/bench_tracer_overhead.py:91 token: '# noqa' @@ -18,8 +18,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - benchmark keeps fd open and uses os.devnull/plain open for parity with - production stream handling; context manager + pathlib would skew timings + context manager + Path.open would skew the timings the benchmark is + measuring - location: ./examples/big_red_button/__main__.py:12 token: '# noqa' @@ -27,8 +27,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - wrap_all must run before importing modules to be traced; import order is - intentional for demo + imports above wrap_all() would not be traced (no module-level traceable + yet) - location: ./examples/big_red_button/app.py:19 token: '# noqa' @@ -36,8 +36,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - wrap_all must run before importing modules to be traced; import order is - intentional for demo + imports above wrap_all() would not be traced (no module-level traceable + yet) - location: ./examples/big_red_button/app.py:20 token: '# noqa' @@ -45,8 +45,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - wrap_all must run before importing modules to be traced; import order is - intentional for demo + imports above wrap_all() would not be traced (no module-level traceable + yet) - location: ./examples/big_red_button/app.py:21 token: '# noqa' @@ -54,8 +54,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - wrap_all must run before importing modules to be traced; import order is - intentional for demo + imports above wrap_all() would not be traced (no module-level traceable + yet) - location: ./examples/big_red_button/app.py:23 token: '# noqa' @@ -63,8 +63,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - wrap_all must run before importing modules to be traced; import order is - intentional for demo + imports above wrap_all() would not be traced (no module-level traceable + yet) - location: ./packages/omniray/omniray/decorators.py:25 token: '# noqa' @@ -72,8 +72,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - _omniwrap_skip: documented sentinel attribute that wrap_all() honors; - module-private not type-private + renaming the underscore would break the published wrap_all() opt-out + contract - location: ./packages/omniray/omniray/decorators.py:25 token: '# type: ignore' @@ -81,8 +81,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - plain functions don't declare _omniwrap_skip in their type; attribute set - as runtime marker only + declaring the marker via Protocol would force every user function into a + custom type - location: ./packages/omniray/omniray/decorators.py:29 token: '# noqa' @@ -90,9 +90,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - trace() exposes 8 user-facing tracing knobs as keyword-only args; each is - a public override of a global flag and merging them would hurt - discoverability + config-struct param would hide the 8 public knobs from IDE autocomplete - location: ./packages/omniray/omniray/decorators.py:82 token: '# type: ignore' @@ -100,9 +98,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - mypy can't prove async_wrapper satisfies Callable[P, T] — inner return - is CallResult (Any), not T; @wraps + ParamSpec preserve actual signature - at runtime/callers + narrowing CallResult to T statically would need generic narrowing mypy + lacks - location: ./packages/omniray/omniray/decorators.py:101 token: '# type: ignore' @@ -110,8 +107,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - same reason as async variant: sync_wrapper returns CallResult (Any) not T; - ParamSpec/@wraps preserve actual signature + narrowing CallResult to T statically would need generic narrowing mypy + lacks - location: ./packages/omniray/omniray/decorators.py:106 token: '# noqa' @@ -119,8 +116,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - create_trace_wrapper mirrors trace()'s 8 user-facing knobs; merging them - into a config object would split the public surface + config-struct param would force users to import a config class for trivial + overrides - location: ./packages/omniray/omniray/tracing/compactor.py:51 token: '# noqa' @@ -128,8 +125,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - add() aggregates 5 optional per-call metrics in a single pass; merging - into struct would force callers to build it on hot path + callers would allocate a metrics struct per call on the trace hot path - location: ./packages/omniray/omniray/tracing/compactor.py:154 token: '# noqa' @@ -137,8 +133,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - note_exit_success forwards 5 optional metric channels into streak buffer; - same per-call metric set as add() + callers would allocate a metrics struct per call on the trace hot path - location: ./packages/omniray/omniray/tracing/compactor.py:227 token: '# noqa' @@ -146,8 +141,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - profilers helper reused across tracing modules; module-private not - type-private + exposing these formatters publicly would lock in a private helper as API - location: ./packages/omniray/omniray/tracing/compactor.py:271 token: '# noqa' @@ -155,8 +149,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - profilers helper reused across tracing modules; module-private not - type-private + exposing these formatters publicly would lock in a private helper as API - location: ./packages/omniray/omniray/tracing/compactor.py:272 token: '# noqa' @@ -164,8 +157,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - profilers helper reused across tracing modules; module-private not - type-private + exposing these formatters publicly would lock in a private helper as API - location: ./packages/omniray/omniray/tracing/compactor.py:279 token: '# noqa' @@ -173,8 +165,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - profilers helper reused across tracing modules; module-private not - type-private + exposing these formatters publicly would lock in a private helper as API - location: ./packages/omniray/omniray/tracing/compactor.py:281 token: '# noqa' @@ -182,8 +173,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - profilers helper reused across tracing modules; module-private not - type-private + exposing these formatters publicly would lock in a private helper as API - location: ./packages/omniray/omniray/tracing/compactor.py:283 token: '# noqa' @@ -191,8 +181,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - profilers helper reused across tracing modules; module-private not - type-private + exposing these formatters publicly would lock in a private helper as API - location: ./packages/omniray/omniray/tracing/compactor.py:287 token: '# noqa' @@ -200,8 +189,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - profilers helper reused across tracing modules; module-private not - type-private + exposing these formatters publicly would lock in a private helper as API - location: ./packages/omniray/omniray/tracing/compactor.py:292 token: '# noqa' @@ -209,61 +197,61 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - profilers helper reused across tracing modules; module-private not - type-private + exposing these formatters publicly would lock in a private helper as API - location: ./packages/omniray/omniray/tracing/flags.py:49 token: '# noqa' content: 'def resolve_trace_flags( # noqa: PLR0913' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - 8 nullable flags resolved per trace call; aggregating into a struct would - force allocation on hot path (caller-side construction) + why: 'struct allocation per trace call would hurt the hot path' - location: ./packages/omniray/omniray/tracing/flags.py:102 token: '# noqa' content: 'def _resolve_all( # noqa: PLR0913' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - internal helper that mirrors resolve_trace_flags signature; splitting - would just duplicate plumbing + why: 'splitting would duplicate parameter plumbing for no behavioral gain' - location: ./packages/omniray/omniray/tracing/otel.py:32 token: '# noqa' content: 'from opentelemetry import trace as api # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'otel is an optional extra; import inside try/except' + why: >- + module-top import would crash omniray install without the [otel] extra - location: ./packages/omniray/omniray/tracing/otel.py:33 token: '# noqa' content: 'from opentelemetry.trace import INVALID_SPAN # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'otel is an optional extra; import inside try/except' + why: >- + module-top import would crash omniray install without the [otel] extra - location: ./packages/omniray/omniray/tracing/otel.py:34 token: '# noqa' content: 'from opentelemetry.trace import Span as _OtelSpan # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'otel is an optional extra; import inside try/except' + why: >- + module-top import would crash omniray install without the [otel] extra - location: ./packages/omniray/omniray/tracing/otel.py:35 token: '# noqa' content: 'from opentelemetry.trace import Status as _Status # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'otel is an optional extra; import inside try/except' + why: >- + module-top import would crash omniray install without the [otel] extra - location: ./packages/omniray/omniray/tracing/otel.py:36 token: '# noqa' content: 'from opentelemetry.trace import StatusCode as _StatusCode # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'otel is an optional extra; import inside try/except' + why: >- + module-top import would crash omniray install without the [otel] extra - location: ./packages/omniray/omniray/tracing/profilers.py:49 token: '# noqa' @@ -271,17 +259,14 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - log_span_success renders 5 optional metric channels into a single - formatted line; keyword args mirror tracer's metric set + callers would allocate a metrics struct per call on the trace hot path - location: ./packages/omniray/omniray/tracing/rss.py:18 token: '# pragma: no cover' content: 'except ImportError: # pragma: no cover — Windows path' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - stdlib 'resource' module is Unix-only; ImportError only triggers on - Windows where CI doesn't run, so coverage genuinely unreachable + why: 'Linux CI cannot reach the Windows-only ImportError branch' - location: ./packages/omniray/omniray/tracing/rss.py:36 token: '# noqa' @@ -289,29 +274,33 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - pre-fork servers (gunicorn/uvicorn workers) need _PROCESS rebound to - worker pid after fork; module-level cache is the right scope here + removing the cache forces a psutil.Process() allocation on every traced + call - location: ./packages/omniray/omniray/tracing/rss.py:51 token: '# noqa' content: 'except Exception: # noqa: BLE001' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'tracing must never break the traced app; degrade silently to None' + why: >- + narrow except would let an unanticipated psutil bug crash the traced app - location: ./packages/omniray/omniray/tracing/rss.py:69 token: '# noqa' content: 'except Exception: # noqa: BLE001' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'tracing must never break the traced app; degrade silently to None' + why: >- + narrow except would let an unanticipated getrusage bug crash the traced + app - location: ./packages/omniray/omniray/tracing/sizing.py:24 token: '# noqa' content: 'except Exception: # noqa: BLE001' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'tracing must never break the traced app; degrade silently to None' + why: >- + narrow except would let an unanticipated pympler bug crash the traced app - location: ./packages/omniray/omniray/tracing/thresholds.py:77 token: '# noqa' @@ -319,8 +308,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - internal validation helper called with named kwargs from a dispatch table; - positional bool here is not a public API smell + rule targets booleans on public functions; this is a module-internal + helper - location: ./packages/omniray/omniray/tracing/tracers.py:56 token: '# noqa' @@ -328,18 +317,14 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - Tracer.trace is the hot-path entry; 7 keyword-only flag overrides mirror - the public per-trace API (matches trace() decorator and - create_trace_wrapper()) + config-struct param would force allocation per traced call on the hot path - location: ./packages/omniray/omniray/tracing/tracers.py:105 token: '# type: ignore' content: 'context = otel_tracer.start_as_current_span(span_name) if flags.otel else NOOP_CONTEXT # type: ignore[union-attr]' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - otel_tracer is Optional[Tracer] for static analysis but guarded above by - 'flags.otel and HAS_OTEL'; mypy can't follow that invariant + why: 'asserting non-None would add a runtime check on every trace call' - location: ./packages/omniray/omniray/tracing/tracers.py:106 token: '# type: ignore' @@ -347,8 +332,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - context is OtelSpan ctx-mgr or NOOP_CONTEXT union; both support __enter__ - but their span types are heterogeneous + narrowing the union needs Protocol gymnastics over otel's heterogeneous + Spans - location: ./packages/omniray/omniray/tracing/tracers.py:113 token: '# noqa' @@ -356,15 +341,17 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - explicit try/except chosen over contextlib.suppress for readability inside - nested exception handler + contextlib.suppress would hide the nested handler from the surrounding + flow - location: ./packages/omniray/omniray/tracing/tracers.py:117 token: '# noqa' content: 'except Exception: # noqa: BLE001, S110' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'logging the failure must not mask the user exception re-raised below' + why: >- + narrow except would let a tracing-internal bug mask the re-raised user + exception - location: ./packages/omniray/omniray/tracing/tracers.py:133 token: '# noqa' @@ -372,15 +359,17 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - explicit try/except chosen over contextlib.suppress for readability inside - nested exception handler + contextlib.suppress would hide the nested handler from the surrounding + flow - location: ./packages/omniray/omniray/tracing/tracers.py:135 token: '# noqa' content: 'except Exception: # noqa: BLE001, S110' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'logging the failure must not mask the user exception re-raised below' + why: >- + narrow except would let a tracing-internal bug mask the re-raised user + exception - location: ./packages/omniray/omniray/tracing/tracers.py:148 token: '# noqa' @@ -388,9 +377,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - internal completion plumbing: span identity (name/depth), timing, flags, - and pre-measured input/rss must be passed forward to - log_span_success/compactor + pre-measured metrics from the outer scope must reach loggers without + re-measuring - location: ./packages/omniray/omniray/tracing/tracers.py:203 token: '# noqa' @@ -398,17 +386,15 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - internal failure-path plumbing mirrors _finish_tracing's parameter set - plus the exception; splitting would duplicate the call site + splitting would force two call sites in the failure path passing the same + context - location: ./packages/omniray/omniray/tracing/tracers.py:265 token: '# type: ignore' content: 'span.set_status(Status(StatusCode.ERROR, str(exception))) # type: ignore[misc, union-attr]' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - Status/StatusCode are Optional[type] in OtelConfig but only None when - has_otel=False; this branch is only entered when flags.otel is True + why: 'asserting non-None would add a runtime check on every span error' - location: ./packages/omniray/omniray/tracing/tracers.py:278 token: '# noqa' @@ -416,8 +402,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - AsyncTracer.trace mirrors Tracer.trace's 7 keyword-only flag overrides; - signature parity is intentional so caller code is identical sync/async + config-struct param would force allocation per traced call on the async + hot path - location: ./packages/omniray/omniray/tracing/tracers.py:334 token: '# noqa' @@ -425,15 +411,17 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - explicit try/except chosen over contextlib.suppress for readability inside - nested exception handler + contextlib.suppress would hide the nested handler from the surrounding + flow - location: ./packages/omniray/omniray/tracing/tracers.py:338 token: '# noqa' content: 'except Exception: # noqa: BLE001, S110' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'logging the failure must not mask the user exception re-raised below' + why: >- + narrow except would let a tracing-internal bug mask the re-raised user + exception - location: ./packages/omniray/omniray/tracing/tracers.py:354 token: '# noqa' @@ -441,29 +429,31 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - explicit try/except chosen over contextlib.suppress for readability inside - nested exception handler + contextlib.suppress would hide the nested handler from the surrounding + flow - location: ./packages/omniray/omniray/tracing/tracers.py:356 token: '# noqa' content: 'except Exception: # noqa: BLE001, S110' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'logging the failure must not mask the user exception re-raised below' + why: >- + narrow except would let a tracing-internal bug mask the re-raised user + exception - location: ./packages/omniray/omniray/tracing/tracers.py:368 token: '# noqa' content: 'from opentelemetry import context as context_api # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'otel is an optional extra; lazy import inside the otel-only branch' + why: 'top-level import would crash module load without the [otel] extra' - location: ./packages/omniray/omniray/tracing/tracers.py:369 token: '# noqa' content: 'from opentelemetry import trace as trace_api # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'otel is an optional extra; lazy import inside the otel-only branch' + why: 'top-level import would crash module load without the [otel] extra' - location: ./packages/omniray/omniray/tracing/tracers.py:372 token: '# type: ignore' @@ -471,15 +461,14 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - otel_tracer is Optional[Tracer] for static analysis but guarded by - HAS_OTEL invariant; mypy can't follow that across module boundary + asserting non-None would add a runtime check on every async span start - location: ./packages/omniray/omniray/tracing/tracers.py:382 token: '# noqa' content: 'from opentelemetry import context as context_api # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'otel is an optional extra; lazy import inside the otel-only branch' + why: 'top-level import would crash module load without the [otel] extra' - location: ./packages/omniray/omniray/tracing/tracers.py:384 token: '# type: ignore' @@ -487,18 +476,15 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - Token[Context] from context_api.attach() is stored as 'object' to keep it - out of public types; detach() needs the original Token type which mypy - lost + typing the field as Token[Context] would leak otel types into the no-extra + build - location: ./packages/omniray/omniray/tracing/tracers.py:385 token: '# type: ignore' content: 'span.end() # type: ignore[union-attr]' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - span guaranteed non-None when flags.otel is True; otel branch only entered - after HAS_OTEL guard, mypy can't follow that across helpers + why: 'asserting non-None would add a runtime check after every async span' - location: ./packages/omniray/tests/unit/tracing/test_console.py:12 token: '# noqa' @@ -506,8 +492,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - logger imported after setup_console_handler() so handler list reflects - post-setup state + module-level import would bind the handlers reference before setup runs - location: ./packages/omniray/tests/unit/tracing/test_console.py:26 token: '# noqa' @@ -515,15 +500,14 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - logger imported after setup_console_handler() so handler list reflects - post-setup state + module-level import would bind the handlers reference before setup runs - location: ./packages/omniray/tests/unit/tracing/test_console.py:33 token: '# noqa' content: 'import importlib # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'importlib kept local; only used here for the reload() call below' + why: 'module-level import would add a stdlib dep used by only one test' - location: ./packages/omniray/tests/unit/tracing/test_console.py:37 token: '# noqa' @@ -531,8 +515,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - module imported inside test so fresh load happens after CONSOLE_LOG_FLAG - patch + module-level import would prime the cache before the test patches the flag - location: ./packages/omniray/tests/unit/tracing/test_thresholds.py:42 token: '# type: ignore' @@ -540,8 +523,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - test deliberately passes wrong type to assert runtime validation rejects - it; mypy correctly flags the type error we're testing for + letting mypy fail would block the test that proves runtime rejection works - location: ./packages/omniray/tests/unit/tracing/test_thresholds.py:52 token: '# type: ignore' @@ -549,9 +531,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - test deliberately puts wrong-typed element in list to assert runtime - validation rejects it; mypy correctly flags the type error we're testing - for + letting mypy fail would block the test that proves runtime rejection works - location: ./packages/omniray/tests/unit/tracing/test_thresholds.py:63 token: '# type: ignore' @@ -559,8 +539,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - test deliberately passes wrong type to assert runtime validation rejects - it; mypy correctly flags the type error we're testing for + letting mypy fail would block the test that proves runtime rejection works - location: ./packages/omniray/tests/unit/tracing/test_thresholds.py:68 token: '# type: ignore' @@ -568,8 +547,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - test passes bool to assert it's rejected; bool is a subclass of int so - mypy considers it valid but runtime check rejects it + bool is structurally int to mypy; only the runtime check distinguishes + them - location: ./packages/omniray/tests/unit/tracing/test_thresholds.py:79 token: '# type: ignore' @@ -577,8 +556,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - test deliberately passes wrong type to assert runtime validation rejects - it; mypy correctly flags the type error we're testing for + letting mypy fail would block the test that proves runtime rejection works - location: ./packages/omniray/tests/unit/tracing/test_thresholds.py:97 token: '# type: ignore' @@ -586,8 +564,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - test deliberately passes wrong type to assert runtime validation rejects - it; mypy correctly flags the type error we're testing for + letting mypy fail would block the test that proves runtime rejection works - location: ./packages/omniray/tests/unit/tracing/test_thresholds.py:103 token: '# type: ignore' @@ -595,8 +572,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - test passes bool to assert it's rejected; bool is a subclass of int so - mypy considers it valid but runtime check rejects it + bool is structurally int to mypy; only the runtime check distinguishes + them - location: ./packages/omniwrap/omniwrap/markers.py:19 token: '# noqa' @@ -604,8 +581,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - _omniwrap_skip: documented sentinel attribute that wrap_all() honors; - module-private not type-private + renaming the underscore would break the published wrap_all() opt-out + contract - location: ./packages/omniwrap/omniwrap/markers.py:19 token: '# type: ignore' @@ -613,8 +590,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - plain functions don't declare _omniwrap_skip in their type; attribute set - as runtime marker only + declaring the marker via Protocol would force every user function into a + custom type - location: ./packages/omniwrap/omniwrap/pyproject.py:54 token: '# noqa' @@ -622,9 +599,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - user-supplied raw config classes can raise anything in their - __post_init__; we degrade gracefully to defaults rather than crashing the - app at import time + narrow except cannot enumerate everything users may raise from + __post_init__ - location: ./packages/omniwrap/omniwrap/pyproject.py:134 token: '# type: ignore' @@ -632,225 +608,286 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - is_dataclass narrows raw_cls to DataclassInstance, not the user's T; mypy - can't prove that calling type[T] with kwargs returns T + cast(T, ...) would just move the same suppression to a less direct site - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:64 token: '# noqa' content: 'from myapp.service import UserService # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:83 token: '# noqa' content: 'from myapp.service import UserService # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:102 token: '# noqa' content: 'from myapp.service import UserService # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:120 token: '# noqa' content: 'from myapp.service import UserService # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:139 token: '# noqa' content: 'from myapp.service import UserService # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:161 token: '# noqa' content: 'from myapp.service import Calculator, greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:189 token: '# noqa' content: 'from myapp.service import UserService # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_class_wrapping.py:190 token: '# noqa' content: 'from myapp.utils import Calculator, greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:200 token: '# noqa' content: 'from myapp.service import expensive, regular # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:216 token: '# noqa' content: 'from myapp.service import Service # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:237 token: '# noqa' content: 'from myapp.service import decorated, plain # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:253 token: '# noqa' content: 'from myapp.service import decorated, plain # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:272 token: '# noqa' content: 'from myapp.service import User # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:303 token: '# noqa' content: 'from myapp.service import Config # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:325 token: '# noqa' content: 'from myapp.service import ConcreteService # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:345 token: '# noqa' content: 'from myapp.service import plain, stacked_no_wraps, stacked_with_wraps # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:368 token: '# noqa' content: 'from myapp.service import decorated_fetch, plain_fetch # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_decorator_interactions.py:387 token: '# noqa' content: 'from myapp.service import Service # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:20 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:44 token: '# noqa' content: 'from myapp.service import fetch # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:63 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:64 token: '# noqa' content: 'from myapp.utils import helper # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:90 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_full_pipeline.py:91 token: '# noqa' content: 'from myapp.utils import fetch # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:36 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:53 token: '# noqa' content: 'from myapp.service import fetch # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:69 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:94 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:120 token: '# noqa' content: 'from myapp.service import Service # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_idempotency.py:136 token: '# noqa' content: 'from myapp.service import Service as Svc2 # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:36 token: '# noqa' content: 'from myapp.service import join, my_func # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:43 token: '# noqa' @@ -858,93 +895,115 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - test asserts that the re-exported os.path.join produces the same output as - the stdlib reference; pathlib equivalent would change what's being - compared + pathlib.join would no longer mirror what the test's target re-exports - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:53 token: '# noqa' content: 'from myapp.service import process # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:65 token: '# noqa' content: 'from myapp.service import basename, transform # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:91 token: '# noqa' content: 'from myapp.service import helper as imported_helper # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:92 token: '# noqa' content: 'from myapp.service import process # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_import_filtering.py:93 token: '# noqa' content: 'from myapp.utils import helper # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:34 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:65 token: '# noqa' content: 'from myapp.service import fetch # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:83 token: '# noqa' content: 'from myapp.service import fetch, greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:149 token: '# noqa' content: 'from myapp.service import fetch # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:153 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_multiple_wrappers.py:172 token: '# noqa' content: 'from myapp.service import greet # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:71 token: '# noqa' content: 'from myapp.service import Service, ServiceError # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:75 token: '# noqa' @@ -952,15 +1011,17 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - throwaway test exception inside try/except; production exception style - doesn't apply + moving the message to a constant would clutter the test for no production + benefit - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:90 token: '# noqa' content: 'from myapp.service import Service # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:94 token: '# noqa' @@ -968,15 +1029,17 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - throwaway test exception inside try/except; production exception style - doesn't apply + moving the message to a constant would clutter the test for no production + benefit - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:109 token: '# noqa' content: 'from myapp.service import FatalError, Service # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:112 token: '# noqa' @@ -984,29 +1047,35 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - throwaway test exception inside try/except; production exception style - doesn't apply + moving the message to a constant would clutter the test for no production + benefit - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:126 token: '# noqa' content: 'from myapp.service import Service # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:158 token: '# noqa' content: 'from myapp.service import TimeoutError as SvcTimeout # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:159 token: '# noqa' content: 'from myapp.service import fetch, validate # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_rules.py:163 token: '# noqa' @@ -1014,78 +1083,98 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - throwaway test exception inside try/except; production exception style - doesn't apply + moving the message to a constant would clutter the test for no production + benefit - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_config.py:46 token: '# noqa' content: 'from myapp.service import Conversation, Message # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_config.py:76 token: '# noqa' content: 'from myapp.service import Model # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_config.py:96 token: '# noqa' content: 'from myapp.service import Conversation # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_config.py:147 token: '# noqa' content: 'from myapp.service import Service # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_config.py:173 token: '# noqa' content: 'from myapp.service import healthcheck, process # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:83 token: '# noqa' content: 'from myapp.service import healthcheck, process # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:103 token: '# noqa' content: 'from myapp.service import fetch, healthcheck # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:118 token: '# noqa' content: 'from myapp.service import Service # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:135 token: '# noqa' content: 'from myapp.service import Internal, Public # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:150 token: '# noqa' content: 'from myapp.service import Service, ServiceError, healthcheck # noqa: PLC0415' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'module imported after fixture builds it and wrap_all() runs' + why: >- + module-level import would resolve before the fixture builds the temp + module - location: ./packages/omniwrap/tests/e2e/test_skip_wrap_marker.py:154 token: '# noqa' @@ -1093,8 +1182,8 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - throwaway test exception inside try/except; production exception style - doesn't apply + moving the message to a constant would clutter the test for no production + benefit - location: ./packages/omniwrap/tests/unit/test_performance.py:15 token: '# noqa' @@ -1102,9 +1191,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - noop wrapper conforms to wrapt's (wrapped, instance, args, kwargs) - protocol; 'instance' is unused here on purpose to measure pure delegation - overhead + wrapt protocol fixes the signature; removing instance would break the call - location: ./packages/omniwrap/tests/unit/wrapper/test_is_defined_in_module.py:33 token: '# noqa' @@ -1112,8 +1199,7 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - test specifically targets lambda handling in _is_defined_in_module; - converting to def would no longer exercise the lambda code path + converting to def would no longer test the lambda branch the test targets - location: ./packages/omniwrap/tests/unit/wrapper/test_is_defined_in_module.py:61 token: '# noqa' @@ -1121,5 +1207,4 @@ entries: created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: >- - test specifically targets lambda handling in _is_defined_in_module; - converting to def would no longer exercise the lambda code path + converting to def would no longer test the lambda branch the test targets From 920eaadcb431e388c75ab4ea58144315cfbc711a Mon Sep 17 00:00:00 2001 From: Bartlomiej Flis Date: Sun, 17 May 2026 19:29:50 +0200 Subject: [PATCH 7/7] refactor: address legitimate lint suppressions in tracing package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - profilers._colored/_bucket_color/_format_mb → public (used cross-module in compactor); drops 8 SLF001 noqas - tracers try/except/pass → contextlib.suppress; drops 4 SIM105 + 4 BLE001/S110 noqas - thresholds._validate_bool: value → keyword-only; drops 1 FBT001 noqa - otel: hoist opentelemetry.context / trace into OtelConfig so tracers no longer needs lazy imports inside `if flags.otel:` branches; drops 3 PLC0415 noqas (adds 3 type:ignore[union-attr] at the new call sites) shamefile: 132 → 123 entries. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/omniray/omniray/tracing/compactor.py | 19 +- packages/omniray/omniray/tracing/otel.py | 9 + packages/omniray/omniray/tracing/profilers.py | 22 +- .../omniray/omniray/tracing/thresholds.py | 4 +- packages/omniray/omniray/tracing/tracers.py | 32 +-- .../tests/unit/tracing/test_profilers.py | 10 +- shamefile.yaml | 228 ++++-------------- 7 files changed, 87 insertions(+), 237 deletions(-) diff --git a/packages/omniray/omniray/tracing/compactor.py b/packages/omniray/omniray/tracing/compactor.py index 63fa7ca..fb658c1 100644 --- a/packages/omniray/omniray/tracing/compactor.py +++ b/packages/omniray/omniray/tracing/compactor.py @@ -224,7 +224,7 @@ def _emit_summary(self, streak: _Streak) -> None: logger.info( "%s%s %s", profilers.get_indent(streak.depth, is_start=False), - profilers._colored(Fore.RED + Style.BRIGHT, f"x{streak.count}"), # noqa: SLF001 + profilers.colored(Fore.RED + Style.BRIGHT, f"x{streak.count}"), streak.span_name, ) cont = _continuation_indent(streak.depth) @@ -268,26 +268,23 @@ def _format_time_line(streak: _Streak, avg_ms: float, thresholds: Thresholds) -> def _color_ms(value_ms: float, thresholds: Thresholds) -> str: - color = profilers._bucket_color(value_ms, thresholds.duration_ms) # noqa: SLF001 - return profilers._colored(color, f"{value_ms:.2f}ms") # noqa: SLF001 + color = profilers.bucket_color(value_ms, thresholds.duration_ms) + return profilers.colored(color, f"{value_ms:.2f}ms") def _format_memory_line(streak: _Streak, thresholds: Thresholds) -> str: """Build the ``memory:`` continuation line, omitting unset fields.""" parts: list[str] = [] if streak.total_input_mb is not None: - parts.append("Σin: " + profilers._format_mb(streak.total_input_mb, thresholds.size_mb)) # noqa: SLF001 + parts.append("Σin: " + profilers.format_mb(streak.total_input_mb, thresholds.size_mb)) if streak.total_output_mb is not None: - parts.append("Σout: " + profilers._format_mb(streak.total_output_mb, thresholds.size_mb)) # noqa: SLF001 + parts.append("Σout: " + profilers.format_mb(streak.total_output_mb, thresholds.size_mb)) if streak.max_rss_mb is not None: - parts.append("rss: " + profilers._format_mb(streak.max_rss_mb, thresholds.rss_mb)) # noqa: SLF001 + parts.append("rss: " + profilers.format_mb(streak.max_rss_mb, thresholds.rss_mb)) if streak.total_rss_delta_mb is not None: parts.append( - "Σ" - + profilers._format_mb( # noqa: SLF001 - streak.total_rss_delta_mb, thresholds.rss_delta_mb, sign=True - ) + "Σ" + profilers.format_mb(streak.total_rss_delta_mb, thresholds.rss_delta_mb, sign=True) ) if streak.max_rss_peak_mb is not None: - parts.append("peak: " + profilers._format_mb(streak.max_rss_peak_mb, thresholds.rss_mb)) # noqa: SLF001 + parts.append("peak: " + profilers.format_mb(streak.max_rss_peak_mb, thresholds.rss_mb)) return ", ".join(parts) diff --git a/packages/omniray/omniray/tracing/otel.py b/packages/omniray/omniray/tracing/otel.py index 1ed34c8..e1b472a 100644 --- a/packages/omniray/omniray/tracing/otel.py +++ b/packages/omniray/omniray/tracing/otel.py @@ -24,11 +24,14 @@ class OtelConfig: status: type[_StatusType] | None status_code: type[_StatusCodeType] | None span_type: type | None + context_api: object | None + trace_api: object | None def _init_otel(*, module_name: str) -> OtelConfig: """Initialize OpenTelemetry integration if available.""" try: + from opentelemetry import context as _context_api # noqa: PLC0415 from opentelemetry import trace as api # noqa: PLC0415 from opentelemetry.trace import INVALID_SPAN # noqa: PLC0415 from opentelemetry.trace import Span as _OtelSpan # noqa: PLC0415 @@ -42,6 +45,8 @@ def _init_otel(*, module_name: str) -> OtelConfig: status=_Status, status_code=_StatusCode, span_type=_OtelSpan, + context_api=_context_api, + trace_api=api, ) except ImportError: return OtelConfig( @@ -51,6 +56,8 @@ def _init_otel(*, module_name: str) -> OtelConfig: status=None, status_code=None, span_type=None, + context_api=None, + trace_api=None, ) @@ -77,5 +84,7 @@ def _check_otel_env(*, flag: bool | None, has_otel: bool) -> bool | None: Status = _otel.status StatusCode = _otel.status_code OtelSpan = _otel.span_type +context_api = _otel.context_api +trace_api = _otel.trace_api OTEL_FLAG = _check_otel_env(flag=_env_flag("OMNIRAY_OTEL"), has_otel=HAS_OTEL) diff --git a/packages/omniray/omniray/tracing/profilers.py b/packages/omniray/omniray/tracing/profilers.py index ed798e9..b62e232 100644 --- a/packages/omniray/omniray/tracing/profilers.py +++ b/packages/omniray/omniray/tracing/profilers.py @@ -58,16 +58,16 @@ def log_span_success( # noqa: PLR0913 rss_peak_mb: float | None = None, ) -> None: """Log span success with per-segment colored values.""" - body = _colored( - _bucket_color(duration_ms, _THRESHOLDS.duration_ms), + body = colored( + bucket_color(duration_ms, _THRESHOLDS.duration_ms), f"{duration_ms:.2f}ms", ) if input_size_mb is not None: - body += ", in: " + _format_mb(input_size_mb, _THRESHOLDS.size_mb) + body += ", in: " + format_mb(input_size_mb, _THRESHOLDS.size_mb) if output_size_mb is not None: - body += ", out: " + _format_mb(output_size_mb, _THRESHOLDS.size_mb) + body += ", out: " + format_mb(output_size_mb, _THRESHOLDS.size_mb) if rss_current_mb is not None: - body += ", rss: " + _format_mb(rss_current_mb, _THRESHOLDS.rss_mb) + body += ", rss: " + format_mb(rss_current_mb, _THRESHOLDS.rss_mb) extras = _format_rss_extras(rss_delta_mb, rss_peak_mb) if extras: body += f" ({extras})" @@ -104,12 +104,12 @@ def get_indent(depth: int, *, is_start: bool = True) -> str: return prefix + (NEST_START if is_start else NEST_END) -def _colored(color: str, text: str) -> str: +def colored(color: str, text: str) -> str: """Wrap *text* in *color* with a trailing style reset.""" return f"{color}{text}{Style.RESET_ALL}" -def _bucket_color(value: float, thresholds: tuple[float, float, float]) -> str: +def bucket_color(value: float, thresholds: tuple[float, float, float]) -> str: """Map *value* onto a DIM/GREEN/YELLOW/RED bucket using ``(low, medium, high)``.""" low, medium, high = thresholds if value < low: @@ -121,19 +121,19 @@ def _bucket_color(value: float, thresholds: tuple[float, float, float]) -> str: return Fore.RED + Style.BRIGHT -def _format_mb(value: float, thresholds: tuple[float, float, float], *, sign: bool = False) -> str: +def format_mb(value: float, thresholds: tuple[float, float, float], *, sign: bool = False) -> str: """Return a colored ``X.XXMB`` string; ``sign=True`` forces a leading +/-.""" spec = f"{value:+.2f}" if sign else f"{value:.2f}" - return _colored(_bucket_color(value, thresholds), f"{spec}MB") + return colored(bucket_color(value, thresholds), f"{spec}MB") def _format_rss_extras(rss_delta_mb: float | None, rss_peak_mb: float | None) -> str: """Build the ``Δ..., max: ...`` group (empty string when both inputs are ``None``).""" extras: list[str] = [] if rss_delta_mb is not None: - extras.append(DELTA + _format_mb(rss_delta_mb, _THRESHOLDS.rss_delta_mb, sign=True)) + extras.append(DELTA + format_mb(rss_delta_mb, _THRESHOLDS.rss_delta_mb, sign=True)) if rss_peak_mb is not None: - extras.append("max: " + _format_mb(rss_peak_mb, _THRESHOLDS.rss_mb)) + extras.append("max: " + format_mb(rss_peak_mb, _THRESHOLDS.rss_mb)) return ", ".join(extras) diff --git a/packages/omniray/omniray/tracing/thresholds.py b/packages/omniray/omniray/tracing/thresholds.py index f01c5e9..ed0df8f 100644 --- a/packages/omniray/omniray/tracing/thresholds.py +++ b/packages/omniray/omniray/tracing/thresholds.py @@ -50,7 +50,7 @@ def __post_init__(self) -> None: self._validate_triple("rss_delta", self.rss_delta) self._validate_triple("duration_ms", self.duration_ms) self._validate_scalar("duration_slow_tag_ms", self.duration_slow_tag_ms) - self._validate_bool("compact", self.compact) + self._validate_bool("compact", value=self.compact) self._validate_positive_int("compact_threshold", self.compact_threshold, minimum=2) def _validate_triple(self, name: str, value: list[float] | None) -> None: @@ -74,7 +74,7 @@ def _validate_scalar(self, name: str, value: float | None) -> None: msg = f"{name} must be numeric, got {type(value).__name__}" raise self.ConfigError(msg) - def _validate_bool(self, name: str, value: bool | None) -> None: # noqa: FBT001 + def _validate_bool(self, name: str, *, value: bool | None) -> None: if value is None: return if not isinstance(value, bool): diff --git a/packages/omniray/omniray/tracing/tracers.py b/packages/omniray/omniray/tracing/tracers.py index 7211cfc..17d9f55 100644 --- a/packages/omniray/omniray/tracing/tracers.py +++ b/packages/omniray/omniray/tracing/tracers.py @@ -10,6 +10,7 @@ from __future__ import annotations import time +from contextlib import suppress from contextvars import ContextVar from typing import TYPE_CHECKING @@ -25,7 +26,9 @@ OTEL_MISSING_MSG, Status, StatusCode, + context_api, otel_tracer, + trace_api, ) from omniray.tracing.rss import read_peak_rss_mb, read_rss_mb from omniray.tracing.sizing import measure_size_mb @@ -110,12 +113,10 @@ def trace( # noqa: PLR0913 result = wrapped(*args, **kwargs) except Exception as e: duration_s = time.time() - start_time - try: # noqa: SIM105 - tracing must never mask user exceptions + with suppress(Exception): cls._finish_tracing_failure( span, duration_s, span_name, current_depth, e, flags ) - except Exception: # noqa: BLE001, S110 - pass raise else: duration_s = time.time() - start_time @@ -130,10 +131,8 @@ def trace( # noqa: PLR0913 ) return result finally: - try: # noqa: SIM105 - tracing must never mask user exceptions + with suppress(Exception): cls._trace_duration(span, duration_s) - except Exception: # noqa: BLE001, S110 - pass finally: _call_depth.set(current_depth) @@ -331,12 +330,10 @@ async def trace( # noqa: PLR0913 result = await wrapped(*args, **kwargs) except Exception as e: duration_s = time.time() - start_time - try: # noqa: SIM105 - tracing must never mask user exceptions + with suppress(Exception): cls._finish_tracing_failure( span, duration_s, span_name, current_depth, e, flags ) - except Exception: # noqa: BLE001, S110 - pass raise else: duration_s = time.time() - start_time @@ -351,10 +348,8 @@ async def trace( # noqa: PLR0913 ) return result finally: - try: # noqa: SIM105 - tracing must never mask user exceptions + with suppress(Exception): cls._trace_duration(span, duration_s) - except Exception: # noqa: BLE001, S110 - pass finally: cls._exit_otel_span(span, token, flags) finally: @@ -365,13 +360,10 @@ def _enter_otel_span(span_name: str, flags: TraceFlags) -> tuple: """Start an OTel span with explicit attach — no generator, safe for async GC.""" if not flags.otel: return None, None - from opentelemetry import context as context_api # noqa: PLC0415 - from opentelemetry import trace as trace_api # noqa: PLC0415 - - # otel_tracer guaranteed non-None: guarded by flags.otel + HAS_OTEL + # otel_tracer/context_api/trace_api guaranteed non-None: guarded by flags.otel + HAS_OTEL span = otel_tracer.start_span(span_name) # type: ignore[union-attr] - ctx = trace_api.set_span_in_context(span) - token = context_api.attach(ctx) + ctx = trace_api.set_span_in_context(span) # type: ignore[union-attr] + token = context_api.attach(ctx) # type: ignore[union-attr] return span, token @staticmethod @@ -379,7 +371,5 @@ def _exit_otel_span(span: OtelSpan | None, token: object | None, flags: TraceFla """Detach context and end span. Counterpart to :meth:`_enter_otel_span`.""" if not flags.otel: return - from opentelemetry import context as context_api # noqa: PLC0415 - - context_api.detach(token) # type: ignore[arg-type] # Token[Context] stored as object + context_api.detach(token) # type: ignore[union-attr, arg-type] span.end() # type: ignore[union-attr] diff --git a/packages/omniray/tests/unit/tracing/test_profilers.py b/packages/omniray/tests/unit/tracing/test_profilers.py index 2d09077..ea5202a 100644 --- a/packages/omniray/tests/unit/tracing/test_profilers.py +++ b/packages/omniray/tests/unit/tracing/test_profilers.py @@ -320,9 +320,9 @@ def test_get_indent_depth_two(): ], ) def test_bucket_color_for_duration(monkeypatch, duration_ms, expected_color): - """Test _bucket_color returns correct color for different durations.""" + """Test bucket_color returns correct color for different durations.""" monkeypatch.setattr(profilers, "_THRESHOLDS", Thresholds()) - result = profilers._bucket_color(duration_ms, profilers._THRESHOLDS.duration_ms) + result = profilers.bucket_color(duration_ms, profilers._THRESHOLDS.duration_ms) assert result == expected_color @@ -440,7 +440,7 @@ def test_resolve_unicode_support_forced_style(monkeypatch, style, expected): ) def test_bucket_color_for_size(monkeypatch, value, expected): monkeypatch.setattr(profilers, "_THRESHOLDS", _DEFAULT_THRESHOLDS) - assert profilers._bucket_color(value, _DEFAULT_THRESHOLDS.size_mb) == expected + assert profilers.bucket_color(value, _DEFAULT_THRESHOLDS.size_mb) == expected @pytest.mark.parametrize( @@ -454,7 +454,7 @@ def test_bucket_color_for_size(monkeypatch, value, expected): ) def test_bucket_color_for_rss(monkeypatch, value, expected): monkeypatch.setattr(profilers, "_THRESHOLDS", _DEFAULT_THRESHOLDS) - assert profilers._bucket_color(value, _DEFAULT_THRESHOLDS.rss_mb) == expected + assert profilers.bucket_color(value, _DEFAULT_THRESHOLDS.rss_mb) == expected @pytest.mark.parametrize( @@ -472,4 +472,4 @@ def test_bucket_color_for_rss(monkeypatch, value, expected): def test_bucket_color_for_rss_delta(monkeypatch, value, expected): """Unified DIM/GREEN/YELLOW/RED ladder — negative/near-zero fall into ``< low`` → DIM.""" monkeypatch.setattr(profilers, "_THRESHOLDS", _DEFAULT_THRESHOLDS) - assert profilers._bucket_color(value, _DEFAULT_THRESHOLDS.rss_delta_mb) == expected + assert profilers.bucket_color(value, _DEFAULT_THRESHOLDS.rss_delta_mb) == expected diff --git a/shamefile.yaml b/shamefile.yaml index a70f2b2..f313763 100644 --- a/shamefile.yaml +++ b/shamefile.yaml @@ -135,70 +135,6 @@ entries: why: >- callers would allocate a metrics struct per call on the trace hot path - - location: ./packages/omniray/omniray/tracing/compactor.py:227 - token: '# noqa' - content: 'profilers._colored(Fore.RED + Style.BRIGHT, f"x{streak.count}"), # noqa: SLF001' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - exposing these formatters publicly would lock in a private helper as API - - - location: ./packages/omniray/omniray/tracing/compactor.py:271 - token: '# noqa' - content: 'color = profilers._bucket_color(value_ms, thresholds.duration_ms) # noqa: SLF001' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - exposing these formatters publicly would lock in a private helper as API - - - location: ./packages/omniray/omniray/tracing/compactor.py:272 - token: '# noqa' - content: 'return profilers._colored(color, f"{value_ms:.2f}ms") # noqa: SLF001' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - exposing these formatters publicly would lock in a private helper as API - - - location: ./packages/omniray/omniray/tracing/compactor.py:279 - token: '# noqa' - content: 'parts.append("Σin: " + profilers._format_mb(streak.total_input_mb, thresholds.size_mb)) # noqa: SLF001' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - exposing these formatters publicly would lock in a private helper as API - - - location: ./packages/omniray/omniray/tracing/compactor.py:281 - token: '# noqa' - content: 'parts.append("Σout: " + profilers._format_mb(streak.total_output_mb, thresholds.size_mb)) # noqa: SLF001' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - exposing these formatters publicly would lock in a private helper as API - - - location: ./packages/omniray/omniray/tracing/compactor.py:283 - token: '# noqa' - content: 'parts.append("rss: " + profilers._format_mb(streak.max_rss_mb, thresholds.rss_mb)) # noqa: SLF001' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - exposing these formatters publicly would lock in a private helper as API - - - location: ./packages/omniray/omniray/tracing/compactor.py:287 - token: '# noqa' - content: '+ profilers._format_mb( # noqa: SLF001' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - exposing these formatters publicly would lock in a private helper as API - - - location: ./packages/omniray/omniray/tracing/compactor.py:292 - token: '# noqa' - content: 'parts.append("peak: " + profilers._format_mb(streak.max_rss_peak_mb, thresholds.rss_mb)) # noqa: SLF001' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - exposing these formatters publicly would lock in a private helper as API - - location: ./packages/omniray/omniray/tracing/flags.py:49 token: '# noqa' content: 'def resolve_trace_flags( # noqa: PLR0913' @@ -213,7 +149,15 @@ entries: owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: 'splitting would duplicate parameter plumbing for no behavioral gain' - - location: ./packages/omniray/omniray/tracing/otel.py:32 + - location: ./packages/omniray/omniray/tracing/otel.py:34 + token: '# noqa' + content: 'from opentelemetry import context as _context_api # noqa: PLC0415' + created_at: 2026-05-17 + owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + why: >- + module-top import would crash omniray install without the [otel] extra + + - location: ./packages/omniray/omniray/tracing/otel.py:35 token: '# noqa' content: 'from opentelemetry import trace as api # noqa: PLC0415' created_at: 2026-05-17 @@ -221,7 +165,7 @@ entries: why: >- module-top import would crash omniray install without the [otel] extra - - location: ./packages/omniray/omniray/tracing/otel.py:33 + - location: ./packages/omniray/omniray/tracing/otel.py:36 token: '# noqa' content: 'from opentelemetry.trace import INVALID_SPAN # noqa: PLC0415' created_at: 2026-05-17 @@ -229,27 +173,27 @@ entries: why: >- module-top import would crash omniray install without the [otel] extra - - location: ./packages/omniray/omniray/tracing/otel.py:34 + - location: ./packages/omniray/omniray/tracing/otel.py:37 token: '# noqa' content: 'from opentelemetry.trace import Span as _OtelSpan # noqa: PLC0415' created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + owner: Bartlomiej Flis why: >- module-top import would crash omniray install without the [otel] extra - - location: ./packages/omniray/omniray/tracing/otel.py:35 + - location: ./packages/omniray/omniray/tracing/otel.py:38 token: '# noqa' content: 'from opentelemetry.trace import Status as _Status # noqa: PLC0415' created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + owner: Bartlomiej Flis why: >- module-top import would crash omniray install without the [otel] extra - - location: ./packages/omniray/omniray/tracing/otel.py:36 + - location: ./packages/omniray/omniray/tracing/otel.py:39 token: '# noqa' content: 'from opentelemetry.trace import StatusCode as _StatusCode # noqa: PLC0415' created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> + owner: Bartlomiej Flis why: >- module-top import would crash omniray install without the [otel] extra @@ -302,16 +246,7 @@ entries: why: >- narrow except would let an unanticipated pympler bug crash the traced app - - location: ./packages/omniray/omniray/tracing/thresholds.py:77 - token: '# noqa' - content: 'def _validate_bool(self, name: str, value: bool | None) -> None: # noqa: FBT001' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - rule targets booleans on public functions; this is a module-internal - helper - - - location: ./packages/omniray/omniray/tracing/tracers.py:56 + - location: ./packages/omniray/omniray/tracing/tracers.py:59 token: '# noqa' content: 'def trace( # noqa: PLR0913' created_at: 2026-05-17 @@ -319,14 +254,14 @@ entries: why: >- config-struct param would force allocation per traced call on the hot path - - location: ./packages/omniray/omniray/tracing/tracers.py:105 + - location: ./packages/omniray/omniray/tracing/tracers.py:108 token: '# type: ignore' content: 'context = otel_tracer.start_as_current_span(span_name) if flags.otel else NOOP_CONTEXT # type: ignore[union-attr]' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: 'asserting non-None would add a runtime check on every trace call' - - location: ./packages/omniray/omniray/tracing/tracers.py:106 + - location: ./packages/omniray/omniray/tracing/tracers.py:109 token: '# type: ignore' content: 'with context as span: # type: ignore[union-attr]' created_at: 2026-05-17 @@ -335,43 +270,7 @@ entries: narrowing the union needs Protocol gymnastics over otel's heterogeneous Spans - - location: ./packages/omniray/omniray/tracing/tracers.py:113 - token: '# noqa' - content: 'try: # noqa: SIM105 - tracing must never mask user exceptions' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - contextlib.suppress would hide the nested handler from the surrounding - flow - - - location: ./packages/omniray/omniray/tracing/tracers.py:117 - token: '# noqa' - content: 'except Exception: # noqa: BLE001, S110' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - narrow except would let a tracing-internal bug mask the re-raised user - exception - - - location: ./packages/omniray/omniray/tracing/tracers.py:133 - token: '# noqa' - content: 'try: # noqa: SIM105 - tracing must never mask user exceptions' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - contextlib.suppress would hide the nested handler from the surrounding - flow - - - location: ./packages/omniray/omniray/tracing/tracers.py:135 - token: '# noqa' - content: 'except Exception: # noqa: BLE001, S110' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - narrow except would let a tracing-internal bug mask the re-raised user - exception - - - location: ./packages/omniray/omniray/tracing/tracers.py:148 + - location: ./packages/omniray/omniray/tracing/tracers.py:147 token: '# noqa' content: 'def _finish_tracing( # noqa: PLR0913' created_at: 2026-05-17 @@ -380,7 +279,7 @@ entries: pre-measured metrics from the outer scope must reach loggers without re-measuring - - location: ./packages/omniray/omniray/tracing/tracers.py:203 + - location: ./packages/omniray/omniray/tracing/tracers.py:202 token: '# noqa' content: 'def _finish_tracing_failure( # noqa: PLR0913' created_at: 2026-05-17 @@ -389,14 +288,14 @@ entries: splitting would force two call sites in the failure path passing the same context - - location: ./packages/omniray/omniray/tracing/tracers.py:265 + - location: ./packages/omniray/omniray/tracing/tracers.py:264 token: '# type: ignore' content: 'span.set_status(Status(StatusCode.ERROR, str(exception))) # type: ignore[misc, union-attr]' created_at: 2026-05-17 owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> why: 'asserting non-None would add a runtime check on every span error' - - location: ./packages/omniray/omniray/tracing/tracers.py:278 + - location: ./packages/omniray/omniray/tracing/tracers.py:277 token: '# noqa' content: 'async def trace( # noqa: PLR0913' created_at: 2026-05-17 @@ -405,57 +304,7 @@ entries: config-struct param would force allocation per traced call on the async hot path - - location: ./packages/omniray/omniray/tracing/tracers.py:334 - token: '# noqa' - content: 'try: # noqa: SIM105 - tracing must never mask user exceptions' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - contextlib.suppress would hide the nested handler from the surrounding - flow - - - location: ./packages/omniray/omniray/tracing/tracers.py:338 - token: '# noqa' - content: 'except Exception: # noqa: BLE001, S110' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - narrow except would let a tracing-internal bug mask the re-raised user - exception - - - location: ./packages/omniray/omniray/tracing/tracers.py:354 - token: '# noqa' - content: 'try: # noqa: SIM105 - tracing must never mask user exceptions' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - contextlib.suppress would hide the nested handler from the surrounding - flow - - - location: ./packages/omniray/omniray/tracing/tracers.py:356 - token: '# noqa' - content: 'except Exception: # noqa: BLE001, S110' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - narrow except would let a tracing-internal bug mask the re-raised user - exception - - - location: ./packages/omniray/omniray/tracing/tracers.py:368 - token: '# noqa' - content: 'from opentelemetry import context as context_api # noqa: PLC0415' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'top-level import would crash module load without the [otel] extra' - - - location: ./packages/omniray/omniray/tracing/tracers.py:369 - token: '# noqa' - content: 'from opentelemetry import trace as trace_api # noqa: PLC0415' - created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'top-level import would crash module load without the [otel] extra' - - - location: ./packages/omniray/omniray/tracing/tracers.py:372 + - location: ./packages/omniray/omniray/tracing/tracers.py:364 token: '# type: ignore' content: 'span = otel_tracer.start_span(span_name) # type: ignore[union-attr]' created_at: 2026-05-17 @@ -463,23 +312,28 @@ entries: why: >- asserting non-None would add a runtime check on every async span start - - location: ./packages/omniray/omniray/tracing/tracers.py:382 - token: '# noqa' - content: 'from opentelemetry import context as context_api # noqa: PLC0415' + - location: ./packages/omniray/omniray/tracing/tracers.py:365 + token: '# type: ignore' + content: 'ctx = trace_api.set_span_in_context(span) # type: ignore[union-attr]' created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: 'top-level import would crash module load without the [otel] extra' + owner: Bartlomiej Flis + why: 'asserting non-None would add a runtime check on every trace call' - - location: ./packages/omniray/omniray/tracing/tracers.py:384 + - location: ./packages/omniray/omniray/tracing/tracers.py:366 token: '# type: ignore' - content: 'context_api.detach(token) # type: ignore[arg-type] # Token[Context] stored as object' + content: 'token = context_api.attach(ctx) # type: ignore[union-attr]' created_at: 2026-05-17 - owner: Bartłomiej Flis <97804977+BKDDFS@users.noreply.github.com> - why: >- - typing the field as Token[Context] would leak otel types into the no-extra - build + owner: Bartlomiej Flis + why: 'asserting non-None would add a runtime check on every trace call' + + - location: ./packages/omniray/omniray/tracing/tracers.py:374 + token: '# type: ignore' + content: 'context_api.detach(token) # type: ignore[union-attr, arg-type]' + created_at: 2026-05-17 + owner: Bartlomiej Flis + why: 'asserting non-None would add a runtime check on every async span' - - location: ./packages/omniray/omniray/tracing/tracers.py:385 + - location: ./packages/omniray/omniray/tracing/tracers.py:375 token: '# type: ignore' content: 'span.end() # type: ignore[union-attr]' created_at: 2026-05-17