mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-09 03:42:16 +03:00
PLUGINS.md: Be explicit about why plugin_prefs(...) -> Optional[tk.Frame]
This commit is contained in:
parent
a65d77a67e
commit
c1dcd30280
@ -225,6 +225,11 @@ with core EDMC or other plugins.**
|
|||||||
Use `numberFromString()` from EDMC's `l10n.Locale` object to parse input
|
Use `numberFromString()` from EDMC's `l10n.Locale` object to parse input
|
||||||
numbers in a locale-independent way.
|
numbers in a locale-independent way.
|
||||||
|
|
||||||
|
Note that in the following example the function signature defines that it
|
||||||
|
returns `Optional[tk.Frame]` only because we need to allow for `None` if
|
||||||
|
something goes wrong with the creation of the frame (the calling code checks
|
||||||
|
this). You absolutely need to return the `nb.Frame()` instance that you get
|
||||||
|
as in the code below.
|
||||||
```python
|
```python
|
||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
from tkinter import ttk
|
from tkinter import ttk
|
||||||
|
Loading…
x
Reference in New Issue
Block a user