Skip to content

Commit

Permalink
Use the Literal["foo", "bar"] syntax consistently (#6984)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored Jan 20, 2022
1 parent 7dd3555 commit 76af728
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions stdlib/tkinter/ttk.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ class LabeledScale(Frame):
from_: float = ...,
to: float = ...,
*,
compound: Literal["top"] | Literal["bottom"] = ...,
compound: Literal["top", "bottom"] = ...,
**kw: Any,
) -> None: ...
# destroy is overridden, signature does not change
Expand All @@ -1134,7 +1134,7 @@ class OptionMenu(Menubutton):
*values: str,
# rest of these are keyword-only because *args syntax used above
style: str = ...,
direction: Literal["above"] | Literal["below"] | Literal["left"] | Literal["right"] | Literal["flush"] = ...,
direction: Literal["above", "below", "left", "right", "flush"] = ...,
command: Callable[[tkinter.StringVar], Any] | None = ...,
) -> None: ...
# configure, config, cget, destroy are inherited from Menubutton
Expand Down
2 changes: 1 addition & 1 deletion stubs/hdbcli/hdbcli/dbapi.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Cursor:
def prepare(self, operation: str, newcursor: Literal[True]) -> Cursor: ...
@overload
def prepare(self, operation: str, newcursor: Literal[False]) -> Any: ...
def scroll(self, value: int, mode: Literal["absolute"] | Literal["relative"] = ...) -> None: ...
def scroll(self, value: int, mode: Literal["absolute", "relative"] = ...) -> None: ...
def server_cpu_time(self) -> int: ...
def server_memory_usage(self) -> int: ...
def server_processing_time(self) -> int: ...
Expand Down

0 comments on commit 76af728

Please sign in to comment.