mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge pull request #1127 from aaronst/fix-widgets-pylint
fix: pylint no-name-in-module for widgets
This commit is contained in:
@@ -4,11 +4,25 @@ import typing
|
|||||||
|
|
||||||
from ..case import camel_to_snake
|
from ..case import camel_to_snake
|
||||||
|
|
||||||
|
# ⚠️For any new built-in Widget we create, not only do we have to import them here and add them to `__all__`,
|
||||||
|
# but also to the `__init__.pyi` file in this same folder - otherwise text editors and type checkers won't
|
||||||
|
# be able to "see" them.
|
||||||
if typing.TYPE_CHECKING:
|
if typing.TYPE_CHECKING:
|
||||||
from ..widget import Widget
|
from ..widget import Widget
|
||||||
|
from ._button import Button
|
||||||
|
from ._checkbox import Checkbox
|
||||||
|
from ._data_table import DataTable
|
||||||
|
from ._directory_tree import DirectoryTree
|
||||||
|
from ._footer import Footer
|
||||||
|
from ._header import Header
|
||||||
|
from ._placeholder import Placeholder
|
||||||
|
from ._pretty import Pretty
|
||||||
|
from ._static import Static
|
||||||
|
from ._input import Input
|
||||||
|
from ._text_log import TextLog
|
||||||
|
from ._tree_control import TreeControl
|
||||||
|
from ._welcome import Welcome
|
||||||
|
|
||||||
# ⚠️For any new built-in Widget we create, not only we have to add them to the following list, but also to the
|
|
||||||
# `__init__.pyi` file in this same folder - otherwise text editors and type checkers won't be able to "see" them.
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"Button",
|
"Button",
|
||||||
"Checkbox",
|
"Checkbox",
|
||||||
|
|||||||
Reference in New Issue
Block a user