1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-19 02:17:38 +03:00

[Minor] Update Type Hintings

No Content Changes, Shuts Up MyPy
This commit is contained in:
David Sangrey 2024-04-06 16:59:49 -04:00
parent 065e2ae7de
commit d9c7a79155
No known key found for this signature in database
GPG Key ID: 3AEADBB0186884BC
8 changed files with 10 additions and 10 deletions

View File

@ -49,7 +49,7 @@ class ClickCounter:
"""
self.on_preferences_closed("", False) # Save our prefs
def setup_preferences(self, parent: nb.Notebook, cmdr: str, is_beta: bool) -> tk.Frame | None:
def setup_preferences(self, parent: nb.Notebook, cmdr: str, is_beta: bool) -> nb.Frame | None:
"""
setup_preferences is called by plugin_prefs below.
@ -128,7 +128,7 @@ def plugin_stop() -> None:
return cc.on_unload()
def plugin_prefs(parent: nb.Notebook, cmdr: str, is_beta: bool) -> tk.Frame | None:
def plugin_prefs(parent: nb.Notebook, cmdr: str, is_beta: bool) -> nb.Frame | None:
"""
Handle preferences tab for the plugin.

View File

@ -120,7 +120,7 @@ class EntryMenu(ttk.Entry):
pass
class Entry(ttk.Entry or EntryMenu):
class Entry(ttk.Entry or EntryMenu): # type: ignore
"""Custom t(t)k.Entry class to fix some display issues."""
# DEPRECATED: Migrate to ttk.Entry or EntryMenu. Will remove in 5.12 or later.

View File

@ -126,7 +126,7 @@ class Plugin:
return None
def get_prefs(self, parent: ttk.Notebook, cmdr: str | None, is_beta: bool) -> tk.Frame | None:
def get_prefs(self, parent: ttk.Notebook, cmdr: str | None, is_beta: bool) -> nb.Frame | None:
"""
If the plugin provides a prefs frame, create and return it.

View File

@ -84,7 +84,7 @@ def plugin_start3(path: str) -> str:
return 'Coriolis'
def plugin_prefs(parent: ttk.Notebook, cmdr: str | None, is_beta: bool) -> tk.Frame:
def plugin_prefs(parent: ttk.Notebook, cmdr: str | None, is_beta: bool) -> nb.Frame:
"""Set up plugin preferences."""
PADX = 10 # noqa: N806
PADY = 1 # noqa: N806

View File

@ -1898,7 +1898,7 @@ class EDDN:
:param cmdr: the commander under which this upload is made
:param is_beta: whether or not we are in beta mode
:param entry: the journal entry to send
___
Example:
{
"timestamp":"2022-06-10T10:09:41Z",
@ -1932,7 +1932,7 @@ class EDDN:
:param cmdr: the commander under which this upload is made
:param is_beta: whether or not we are in beta mode
:param entry: the journal entry to send
___
Example:
{
"timestamp":"2023-10-01T14:56:34Z",

View File

@ -279,7 +279,7 @@ def toggle_password_visibility():
this.apikey.config(show="*") # type: ignore
def plugin_prefs(parent: ttk.Notebook, cmdr: str | None, is_beta: bool) -> tk.Frame:
def plugin_prefs(parent: ttk.Notebook, cmdr: str | None, is_beta: bool) -> nb.Frame:
"""
Plugin preferences setup hook.

View File

@ -244,7 +244,7 @@ def toggle_password_visibility():
this.apikey.config(show="*")
def plugin_prefs(parent: ttk.Notebook, cmdr: str, is_beta: bool) -> tk.Frame:
def plugin_prefs(parent: ttk.Notebook, cmdr: str, is_beta: bool) -> nb.Frame:
"""Plugin Preferences UI hook."""
PADX = 10 # noqa: N806
BUTTONX = 12 # noqa: N806 # indent Checkbuttons and Radiobuttons

View File

@ -376,7 +376,7 @@ class PreferencesDialog(tk.Toplevel):
)
self.outbutton.grid(column=1, padx=self.PADX, pady=self.PADY, sticky=tk.EW, row=row.get())
nb.Frame(output_frame).grid(row=row.get()) # bottom spacer # TODO: does nothing?
nb.Frame(output_frame).grid(row=row.get()) # type: ignore # bottom spacer # TODO: does nothing?
# LANG: Label for 'Output' Settings/Preferences tab
root_notebook.add(output_frame, text=_('Output')) # Tab heading in settings