Code: Select all
$ mypy mypycode.py
Code: Select all
from mypyc.build import mypycify
from setuptools import setup
from timeit import timeit
import math
setup(
name="mypycode",
package=["mypycode"],
ext_module=mypycify(["mypycode.py"])
)
print("doing something that I want to optimize with mypy")
Code: Select all
mypycode.py:1: error: Skipping analyzing "mypyc.build": module is installed, but missing library stubs or py.typed marker [import-untyped]
mypycode.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
mypycode.py:2: error: Skipping analyzing "setuptools": module is installed, but missing library stubs or py.typed marker [import-untyped]
Hinweis: Ich verwende die Setup-Dinge basierend auf diesem YouTube-Video 3:38, ich bin mir nicht sicher, ob es der richtige Weg ist, mypy zu aktivieren.
Mobile version