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

Not working with create(...) and create_batch somehow #10

Open
sshishov opened this issue Feb 1, 2023 · 4 comments
Open

Not working with create(...) and create_batch somehow #10

sshishov opened this issue Feb 1, 2023 · 4 comments

Comments

@sshishov
Copy link

sshishov commented Feb 1, 2023

I am getting a lot of this errors:

error: "Callable[[VarArg(Any), KwArg(Any)], NoReturn]" has no attribute "create"  [attr-defined]
error: "Callable[[VarArg(Any), KwArg(Any)], NoReturn]" has no attribute "create_batch"  [attr-defined]

when apply the type to DjangoModelFactory

@youtux
Copy link
Owner

youtux commented Feb 28, 2023

can you check if v0.4.0 fixed the issue?

@sshishov
Copy link
Author

sshishov commented May 27, 2023

@youtux sorry, please let me check...

UPDATE: I have checked, it is not the issue anymore (if we are using Factory.create() and Factory.build() everywhere, instead of Factory()

The question which I have now, for every factory.Faker(...) I am getting this error:

Need type annotation for "<field_name>"

How to fight with this one?

@youtux
Copy link
Owner

youtux commented May 29, 2023

can you post the full stack trace, together with the code you are using?

@sshishov
Copy link
Author

And also I have the problem like this, when I add the type declaration for generic DjangoModelFactory:

TypeError: type 'DjangoModelFactory' is not subscriptable

I will create a small reproduction repo shortly. Cannot post from our repo as it is private one, sorry ;)

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

2 participants