Skip to content

Add missing/incomplete type annotations #2487

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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

@Copilot 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
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