Skip to content

Commit

Permalink
Try to fix mypyc issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chadrik committed Aug 2, 2023
1 parent c415851 commit 6534bf3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions mypy/stubutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from typing import Iterable, Iterator, Mapping
from typing_extensions import Final, overload

from mypy_extensions import mypyc_attr

import mypy.options
from mypy.modulefinder import ModuleNotFoundReason
from mypy.moduleinspect import InspectError, ModuleInspect
Expand Down Expand Up @@ -326,6 +328,7 @@ def infer_method_ret_type(name: str) -> str | None:
return None


@mypyc_attr(allow_interpreted_subclasses=True)
class SignatureGenerator:
"""Abstract base class for extracting a list of FunctionSigs for each function."""

Expand Down Expand Up @@ -479,6 +482,7 @@ def import_lines(self) -> list[str]:
return result


@mypyc_attr(allow_interpreted_subclasses=True)
class BaseStubGenerator:
# These names should be omitted from generated stubs.
IGNORED_DUNDERS: Final = {
Expand Down
3 changes: 2 additions & 1 deletion mypy/traverser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from mypy_extensions import mypyc_attr
from mypy_extensions import mypyc_attr, trait

from mypy.nodes import (
REVEAL_TYPE,
Expand Down Expand Up @@ -94,6 +94,7 @@
from mypy.visitor import NodeVisitor


@trait
@mypyc_attr(allow_interpreted_subclasses=True)
class TraverserVisitor(NodeVisitor[None]):
"""A parse tree visitor that traverses the parse tree during visiting.
Expand Down
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,8 @@ def run(self):
"version.py",
# Skip these to reduce the size of the build
"stubtest.py",
"stubgen.py",
"stubgenc.py",
"stubdoc.py",
"stubutil.py",
)
) + (
# Don't want to grab this accidentally
Expand Down

0 comments on commit 6534bf3

Please sign in to comment.