Skip to content

Conversation

@gameroman
Copy link
Contributor

Description

  • Added missing/incomplete type annotations

Describe your tests

How did you test your change? Type checker

Python version: 3.13

OS: Windows

Checklist:

  • I added/edited example on new feature/change (if exists)
  • My changes won't break backward compatibility
  • I made changes both for sync and async

@Badiboy Badiboy requested a review from Copilot June 8, 2025 09:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds missing type annotations to improve code clarity and type checking in the telebot module.

  • Updated the add() method signature in InlineKeyboardMarkup to provide type annotations for *args and row_width.
  • Specifies that *args should be of type InlineKeyboardButton and makes row_width an Optional[int].
Comments suppressed due to low confidence (1)

telebot/types.py:2895

  • Ensure that 'Optional' is imported from the typing module, and consider adding a short inline comment to clarify that *args should be instances of InlineKeyboardButton.
def add(self, *args: InlineKeyboardButton, row_width: Optional[int] = None) -> 'InlineKeyboardMarkup':

@Badiboy
Copy link
Collaborator

Badiboy commented Jun 8, 2025

Your PR is in draft.

@gameroman gameroman marked this pull request as ready for review June 8, 2025 15:35
@Badiboy Badiboy closed this Jul 26, 2025
@gameroman gameroman deleted the types branch November 16, 2025 16:21
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 this pull request may close these issues.

2 participants