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

In MediaMixin.user_medias the user_id parameter is int, but accepts a user_pk string #575

Open
zrbecker opened this issue Feb 9, 2022 · 0 comments

Comments

@zrbecker
Copy link

zrbecker commented Feb 9, 2022

I believe for the user_medias method, the user_id: int parameter should be user_pk: str since there is no id field on the Users model in types.py, and the pk field is a str.

I had been using the pk without issue, but recently turned on typing on my project, and have to convert these from str to int to make typing error go away, but it seems like it was set as int by mistake.

There are a few other methods in this file that accept a user_id: int parameter that probably also require an update for typing to be consistent.

https://github.com/adw0rd/instagrapi/blob/f1f3175e4eb130f46dc3626211e92cabc954eabb/instagrapi/mixins/media.py#L652-L666

https://github.com/adw0rd/instagrapi/blob/f1f3175e4eb130f46dc3626211e92cabc954eabb/instagrapi/types.py#L20-L33

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