Skip to content

Translation failed during import of builtin python module with missing type annotations #258

@gewlar

Description

@gewlar

Nagini returns Type error: Encountered Any type. Type annotation missing? (dataclasses@14.0), when running the following snippet:

from nagini_contracts.contracts import *
from dataclasses import dataclass

class foo:
    pass

Checking the same file with mypy works without issue.

The same error with message Type error: Encountered Any type. Type annotation missing? (enum@25.0) occurs when importing the enum module:

from nagini_contracts.contracts import *
from enum import IntEnum

class foo(IntEnum):
    pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions