Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mypy's "has no attribute" error #579

Open
conservative-dude opened this issue Jan 17, 2024 · 0 comments
Open

mypy's "has no attribute" error #579

conservative-dude opened this issue Jan 17, 2024 · 0 comments

Comments

@conservative-dude
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant