Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

mypy's "has no attribute" error #579

Description

@conservative-dude

Hi,

Databases return Record class instance, and we can get column values by simply specifying column name

record = db.fetch_one(query=query, values=values)
print(record.id)

mypy gives the following error: Mypy: "Record" has no attribute "id" [attr-defined]

Is there a way to set up mypy to work correctly with this use case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions