black: enable skip_magic_trailing_comma (#5252)

* black: enable skip_magic_trailing_comma

* Remove spurious commas
This commit is contained in:
Sebastian Rittau
2021-04-27 17:32:32 +02:00
committed by GitHub
parent b9937184ed
commit 4ac3ccad45
25 changed files with 44 additions and 236 deletions

View File

@@ -348,10 +348,7 @@ class Misc:
# binds do. The default value of func is not str.
@overload
def bind(
self,
sequence: Optional[str] = ...,
func: Optional[Callable[[Event[Misc]], Any]] = ...,
add: Optional[bool] = ...,
self, sequence: Optional[str] = ..., func: Optional[Callable[[Event[Misc]], Any]] = ..., add: Optional[bool] = ...
) -> str: ...
@overload
def bind(self, sequence: Optional[str], func: str, add: Optional[bool] = ...) -> None: ...
@@ -361,10 +358,7 @@ class Misc:
# callbacks will get, so those are Misc.
@overload
def bind_all(
self,
sequence: Optional[str] = ...,
func: Optional[Callable[[Event[Misc]], Any]] = ...,
add: Optional[bool] = ...,
self, sequence: Optional[str] = ..., func: Optional[Callable[[Event[Misc]], Any]] = ..., add: Optional[bool] = ...
) -> str: ...
@overload
def bind_all(self, sequence: Optional[str], func: str, add: Optional[bool] = ...) -> None: ...
@@ -840,10 +834,7 @@ class Widget(BaseWidget, Pack, Place, Grid):
# widgets don't.
@overload
def bind(
self: _W,
sequence: Optional[str] = ...,
func: Optional[Callable[[Event[_W]], Any]] = ...,
add: Optional[bool] = ...,
self: _W, sequence: Optional[str] = ..., func: Optional[Callable[[Event[_W]], Any]] = ..., add: Optional[bool] = ...
) -> str: ...
@overload
def bind(self, sequence: Optional[str], func: str, add: Optional[bool] = ...) -> None: ...
@@ -2682,11 +2673,7 @@ class Text(Widget, XView, YView):
# tag_bind stuff is very similar to Canvas
@overload
def tag_bind(
self,
tagName: str,
sequence: Optional[str],
func: Optional[Callable[[Event[Text]], Any]],
add: Optional[bool] = ...,
self, tagName: str, sequence: Optional[str], func: Optional[Callable[[Event[Text]], Any]], add: Optional[bool] = ...
) -> str: ...
@overload
def tag_bind(self, tagName: str, sequence: Optional[str], func: str, add: Optional[bool] = ...) -> None: ...

View File

@@ -950,10 +950,7 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
# Also, it's 'callback' instead of 'func' here.
@overload
def tag_bind(
self,
tagname: str,
sequence: Optional[str] = ...,
callback: Optional[Callable[[tkinter.Event[Treeview]], Any]] = ...,
self, tagname: str, sequence: Optional[str] = ..., callback: Optional[Callable[[tkinter.Event[Treeview]], Any]] = ...
) -> str: ...
@overload
def tag_bind(self, tagname: str, sequence: Optional[str], callback: str) -> None: ...