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

Improve fields type annotations a little bit. #1479

Closed
Reskov opened this issue Dec 19, 2019 · 0 comments · Fixed by #1480
Closed

Improve fields type annotations a little bit. #1479

Reskov opened this issue Dec 19, 2019 · 0 comments · Fixed by #1480

Comments

@Reskov
Copy link

Reskov commented Dec 19, 2019

I am using mypy with an option --disallow-untyped-calls

From mypy docs

--disallow-untyped-calls
This flag reports an error whenever a function with type annotations calls a function defined without annotations.

Running command

mypy --disallow-untyped-calls .

on following code

import marshmallow as ma
class MySchema(ma.Schema):
    arb = ma.fields.Float()

gives me output

error: Call to untyped function "Float" in typed context

The same for Pluck, Method, Constant
For other ma.fields seem to be fine.

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

Successfully merging a pull request may close this issue.

1 participant