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

bind() 'add' parameter Type #2616

Open
rtommy opened this issue Oct 27, 2024 · 0 comments
Open

bind() 'add' parameter Type #2616

rtommy opened this issue Oct 27, 2024 · 0 comments

Comments

@rtommy
Copy link

rtommy commented Oct 27, 2024

Not every widget has the bind() function defined correctly.

Some Widgets have:
def bind(self, sequence: str = None, command: Callable = None, add: Union[str, bool] = True):

While some other Widgets have:
def bind(self, sequence=None, command=None, add=True):

This definition may lead to a TypeError:
TypeError: Expected unicode, got bool

The recommended defintion would be:
def bind(self, sequence=None, command=None, add: Union[str, bool] = True):

The impacted widgets are:

  • CTkComboBox
  • CtkEntry
  • CtkFrame
  • CtkLabel
  • CtkScrollbar
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