Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions mypy/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
TypeAlias as _TypeAlias,
TypedDict,
cast,
final,
)

from librt.base64 import b64encode
Expand Down Expand Up @@ -2172,6 +2173,7 @@ def __init__(self, reason: int = SuppressionReason.NOT_FOUND) -> None:
self.reason = reason


@final
class State:
"""The state for a module.
Expand Down Expand Up @@ -2258,9 +2260,8 @@ class State:
# Mapping from line number to type ignore codes on this line (for imports only).
imports_ignored: dict[int, list[str]]

@classmethod
@staticmethod
def new_state(
cls,
id: str | None,
path: str | None,
source: str | None,
Expand Down Expand Up @@ -2350,7 +2351,7 @@ def new_state(
error_lines = []
imports_ignored = {}

state = cls(
state = State(
manager=manager,
order=State.order_counter,
id=id,
Expand Down