# Stubtest allowlist - Known acceptable differences between stubs and runtime
# Format: one entry per line, supports patterns with wildcards
# See: https://mypy.readthedocs.io/en/stable/stubtest.html#allowlist

# Registry-backed accessors resolve on instances rather than the proxy classes.
gaspatchio\.column\.column_proxy\.ColumnProxy\.projection
gaspatchio\.column\.expression_proxy\.ExpressionProxy\.excel
gaspatchio\.column\.expression_proxy\.ExpressionProxy\.projection

# frame.graph exports public API (CalcGraph, diff_artifacts, verify_artifact,
# ...), so it is checked; what is listed here is each tooling limit it meets.
# Literal type aliases: stubtest reads an alias for a Literal of several
# strings as a Union it cannot match against the runtime object, and one of a
# single string as no alias it recognises. Same limit as the aliases below.
gaspatchio\.frame\.graph\.assumptions\.ArtefactKind
gaspatchio\.frame\.graph\.calc_graph\._Scope
gaspatchio\.frame\.graph\.diff\.(ChangeKind|ChangeOrigin|DataKind)
gaspatchio\.frame\.graph\.edges\.(EdgeSubtype|EdgeType)
gaspatchio\.frame\.graph\.execution\.(_Check|_Status)
gaspatchio\.frame\.graph\.graph_models\.HoleReason
gaspatchio\.frame\.graph\.validate\.(Section|Severity)
gaspatchio\.frame\.graph\.values_moved\.(DataCause|LineCause|PairedBy)
gaspatchio\.frame\.graph\.verify\.CheckOutcome
# @lru_cache-decorated: stubtest sees the cache wrapper's (*args, **kwargs)
# where the runtime has the wrapped (name: str), as for the holiday helpers
# below. Tooling noise, not a stub bug.
gaspatchio\.frame\.graph\.trace_generator\._name_here

# str-mixin enums: on every `class X(str, Enum)` stubtest compares str.__new__'s
# parameters with the runtime Enum.__new__. Tooling noise, not a stub bug.
gaspatchio\.errors\.models\.(ErrorType|SuggestionType)\.__new__

# A TypedDict on the 3.13 runtime carries __mutable_keys__ and
# __readonly_keys__, which stubtest's 3.12 view of the class does not.
# Tooling noise, not a stub bug.
gaspatchio\.errors\.validation\._ValidationContextFields\.__(mutable|readonly)_keys__
gaspatchio\.frame\.graph\.graph_models\.(NodeType|Provenance)\.__new__

# Scenarios internals
gaspatchio\.scenarios\._.*
# gaspatchio\.scenarios\.T  # removed: unused

# TYPE_CHECKING imports that show as "not present at runtime"
gaspatchio\.typing\.PolarsDataType

# Metaclass differences for ABC classes (acceptable)
gaspatchio\.accessors\.excel\.ExcelColumnAccessor
gaspatchio\.accessors\.excel\.ExcelFrameAccessor

# Module-level `except ImportError as e` in _api.py — the except clause deletes
# the name after the block, which stubtest reports as a phantom deleted symbol.
# Not a stub bug.

# Projection accessor TYPE_CHECKING imports (covered by generic patterns above)
# gaspatchio\.accessors\.projection\.ActuarialFrame  # removed: matched by .*\.ActuarialFrame$
# gaspatchio\.accessors\.projection\.ColumnProxy  # removed: matched by .*\.ColumnProxy$
# gaspatchio\.accessors\.projection\.ExpressionProxy  # removed: matched by .*\.ExpressionProxy$

# TYPE_CHECKING imports that show as "not present at runtime"
# These are imports only used for type annotations, not available at runtime
.*\.ProxyType$

# TYPE_CHECKING-only type alias for the rollforward builder's `ExprLike`
# (pl.Expr | ColumnProxy | ExpressionProxy). Lives behind `if TYPE_CHECKING:`
# so callers don't pay the column-proxy import cost at module load. The
# projection_frame stub mirrors the alias for its rollforward() signature.
gaspatchio\.rollforward\._builder\.ExprLike
gaspatchio\.accessors\.projection_frame\.ExprLike

# Examples module (not part of public API)
gaspatchio\.examples\..*

# Telemetry — @wraps(original_map_elements) intentionally changes the visible signature
# so the warning wrapper looks like the original Polars method to callers.
gaspatchio\.telemetry\._map_with_warning_impl

# Tutorials — standalone scripts, not importable modules (hyphenated dirs, missing deps)
gaspatchio\.tutorials\..*

# Type aliases — stubtest cannot match Literal type aliases against runtime objects.
gaspatchio\._shape\.Shape
gaspatchio\._shape\.Kind
gaspatchio\.frame\.calculations\.RecordOrigin
gaspatchio\.frame\.calculations\.StructuralKind
gaspatchio\.frame\.calculations\.SelectionKind

# Engine seam — Literal TypeAliases, and the two Annotated option aliases the
# artifact commands share. Same tooling limit as the four above: stubtest
# cannot match an alias against the runtime object it resolves to.
gaspatchio\.engines\.protocol\.TreeStatus
gaspatchio\.engines\.protocol\.Scope
gaspatchio\.engines\.compare\.Verdict
gaspatchio\.engines\.report\.Group
gaspatchio\.cli\._JsonOutput
gaspatchio\.cli\._ReportFile
# The two Annotated option aliases docs and knowledge share, for the same reason.
gaspatchio\.cli\._MaxChars
gaspatchio\.cli\._FullTexts

# @cache-decorated versions mapping, the extension's digest among it — the
# same wrapper/wrapped signature mismatch as the holiday helpers below;
# tooling noise, not a stub bug. The second is the @cache-decorated read of
# which distributions provide each import name, the same mismatch.
gaspatchio\.engines\._versions\._taken_once
gaspatchio\.engines\._versions\._import_names

# Schedule module — Literal TypeAliases in private module (not part of public stub surface)
gaspatchio\.schedule\._data\.Anchor
gaspatchio\.schedule\._data\.Frequency

# Curves module — private submodules (not part of the public stub surface)
gaspatchio\.curves\._.*

# Mortality module — private submodules (not part of the public stub surface)
gaspatchio\.mortality\._.*

# Rollforward module — private submodules; TYPE_CHECKING imports are referenced
# in stubs (IR, Op, Schedule, StateRef, RollforwardBuilder, CompiledRollforward,
# EngineBinding, Iterable) but only imported under TYPE_CHECKING at runtime, so
# stubtest reports them as MISSING. Also covers the `Protocol` typing.Protocol
# meta-class drift in _passes.py and the Literal-alias EngineBinding that
# stubtest cannot match against runtime.
gaspatchio\.rollforward\._.*\.EngineBinding

# @lru_cache-decorated holiday helpers — stubgen sees the lru_cache wrapper's
# (*args, **kwargs) signature, runtime sees the wrapped function's actual
# signature (year: int) / (start_year: int, end_year: int). The mismatch is
# tooling noise, not a stub bug. Surfaces on Linux CI but not always on macOS.
gaspatchio\.schedule\._calendar\._ecb_holidays_for_years
gaspatchio\.schedule\._calendar\._uk_holidays_for_year
gaspatchio\.schedule\._calendar\._us_holidays_for_year

# ============================================================================
# Missing-stub ledger (2026-08-09, gh#104)
# CI runs stubtest WITHOUT --ignore-missing-stub as of gh#104: anything that
# exists at runtime but not in a stub fails CI unless listed here with a
# reason. This section is the explicit TODO ledger — remove an entry when the
# surface gets stubbed, and never add one without a reason line.
# ============================================================================

# Python 3.13's dataclass-generated __replace__ — generated on every
# dataclass; tooling noise, not a stub bug.
.*\.__replace__

# Rust extension internals not part of the public stub surface.
gaspatchio\._internal\.__all__


# These three Literal aliases previously fell under frame.graph.*.
# Relocation narrows their exception to the aliases; other semantic code is checked.
gaspatchio\._semantic\.ir\.BinOpKind
gaspatchio\._semantic\.ir\.EngineName
gaspatchio\._semantic\.vocabulary\.OpTier

# The runtime-typed registry replaces its duplicate stub. PEP 695 alias tooling
# limitation (not a missing implementation).
gaspatchio\.frame\.registry\.AccessorRegistryDict
