Skip to content

[BUG] Wrong signature of API objects/methods #2367

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

Closed
Bibo-Joshi opened this issue Feb 7, 2021 · 3 comments · Fixed by #2643
Closed

[BUG] Wrong signature of API objects/methods #2367

Bibo-Joshi opened this issue Feb 7, 2021 · 3 comments · Fixed by #2643
Assignees
Labels
⚙️ bot-api affected functionality: bot-api 🛠 breaking change type: breaking
Milestone

Comments

@Bibo-Joshi
Copy link
Member

in Bot.edit_message_mediag, for some reason media is a optional kwarg, which is clearly wrong. Changing that is breaking, so putting on the v14 milestone.

We could think about expanding test_official to parse the offical docs in order to check such things.

@Bibo-Joshi Bibo-Joshi added bug 🐛 ⚙️ bot-api affected functionality: bot-api 🛠 breaking change type: breaking labels Feb 7, 2021
@Bibo-Joshi Bibo-Joshi added this to the v14 milestone Feb 7, 2021
@Bibo-Joshi Bibo-Joshi changed the title [BUG] Wrong signature of edit_message_media [BUG] Wrong signature of API objects/methods Jul 7, 2021
@Bibo-Joshi
Copy link
Member Author

We have a similar issue with the ChatMember* classes: For the subclasses currently all arguments are optional (except user and status), while most of them actually aren't. B/C users should never have to manually instantiate a ChatMember* manually, that's currently only a documentation/type hinting problem, but it should be fixed at some point.

We should really improve test_official for that …

@Poolitzer
Copy link
Member

I like adding that to the test.

@harshil21 harshil21 self-assigned this Aug 26, 2021
@harshil21
Copy link
Member

Okay its not just these 2, there's many methods whose signatures are wrong...

@harshil21 harshil21 linked a pull request Aug 26, 2021 that will close this issue
@github-actions github-actions bot locked and limited conversation to collaborators Aug 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
⚙️ bot-api affected functionality: bot-api 🛠 breaking change type: breaking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants