The following issues were found
src/textual/keys.py
138 issues
Line: 1
Column: 1
from dataclasses import dataclass
from enum import Enum
# Adapted from prompt toolkit https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/prompt_toolkit/keys.py
class Keys(str, Enum):
"""
List of keys for use in key bindings.
Reported by Pylint.
Line: 4
Column: 1
from dataclasses import dataclass
from enum import Enum
# Adapted from prompt toolkit https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/prompt_toolkit/keys.py
class Keys(str, Enum):
"""
List of keys for use in key bindings.
Reported by Pylint.
Line: 15
Column: 5
strings.
"""
value: str
Escape = "escape" # Also Control-[
ShiftEscape = "shift+escape"
ControlAt = "ctrl+@" # Also Control-Space.
Reported by Pylint.
Line: 17
Column: 5
value: str
Escape = "escape" # Also Control-[
ShiftEscape = "shift+escape"
ControlAt = "ctrl+@" # Also Control-Space.
ControlA = "ctrl+a"
Reported by Pylint.
Line: 18
Column: 5
value: str
Escape = "escape" # Also Control-[
ShiftEscape = "shift+escape"
ControlAt = "ctrl+@" # Also Control-Space.
ControlA = "ctrl+a"
ControlB = "ctrl+b"
Reported by Pylint.
Line: 20
Column: 5
Escape = "escape" # Also Control-[
ShiftEscape = "shift+escape"
ControlAt = "ctrl+@" # Also Control-Space.
ControlA = "ctrl+a"
ControlB = "ctrl+b"
ControlC = "ctrl+c"
ControlD = "ctrl+d"
Reported by Pylint.
Line: 22
Column: 5
ControlAt = "ctrl+@" # Also Control-Space.
ControlA = "ctrl+a"
ControlB = "ctrl+b"
ControlC = "ctrl+c"
ControlD = "ctrl+d"
ControlE = "ctrl+e"
ControlF = "ctrl+f"
Reported by Pylint.
Line: 23
Column: 5
ControlAt = "ctrl+@" # Also Control-Space.
ControlA = "ctrl+a"
ControlB = "ctrl+b"
ControlC = "ctrl+c"
ControlD = "ctrl+d"
ControlE = "ctrl+e"
ControlF = "ctrl+f"
ControlG = "ctrl+g"
Reported by Pylint.
Line: 24
Column: 5
ControlA = "ctrl+a"
ControlB = "ctrl+b"
ControlC = "ctrl+c"
ControlD = "ctrl+d"
ControlE = "ctrl+e"
ControlF = "ctrl+f"
ControlG = "ctrl+g"
ControlH = "ctrl+h"
Reported by Pylint.
Line: 25
Column: 5
ControlA = "ctrl+a"
ControlB = "ctrl+b"
ControlC = "ctrl+c"
ControlD = "ctrl+d"
ControlE = "ctrl+e"
ControlF = "ctrl+f"
ControlG = "ctrl+g"
ControlH = "ctrl+h"
ControlI = "ctrl+i" # Tab
Reported by Pylint.
tests/test_geometry.py
116 issues
Line: 1
Column: 1
import pytest
from textual.geometry import clamp, Offset, Size, Region
def test_dimensions_region():
assert Size(30, 40).region == Region(0, 0, 30, 40)
Reported by Pylint.
Line: 3
Column: 1
import pytest
from textual.geometry import clamp, Offset, Size, Region
def test_dimensions_region():
assert Size(30, 40).region == Region(0, 0, 30, 40)
Reported by Pylint.
Line: 32
Column: 9
def test_dimensions_contains_special():
with pytest.raises(TypeError):
(1, 2, 3) in Size(10, 10)
assert (5, 5) in Size(10, 10)
assert (9, 9) in Size(10, 10)
assert (0, 0) in Size(10, 10)
assert (10, 9) not in Size(10, 10)
Reported by Pylint.
Line: 74
Column: 9
assert Offset(1, 1) + Offset(2, 2) == Offset(3, 3)
assert Offset(1, 2) + Offset(3, 4) == Offset(4, 6)
with pytest.raises(TypeError):
Offset(1, 1) + "foo"
def test_point_sub():
assert Offset(1, 1) - Offset(2, 2) == Offset(-1, -1)
assert Offset(3, 4) - Offset(2, 1) == Offset(1, 3)
Reported by Pylint.
Line: 81
Column: 9
assert Offset(1, 1) - Offset(2, 2) == Offset(-1, -1)
assert Offset(3, 4) - Offset(2, 1) == Offset(1, 3)
with pytest.raises(TypeError):
Offset(1, 1) - "foo"
def test_point_blend():
assert Offset(1, 2).blend(Offset(3, 4), 0) == Offset(1, 2)
assert Offset(1, 2).blend(Offset(3, 4), 1) == Offset(3, 4)
Reported by Pylint.
Line: 111
Column: 9
def test_region_add():
assert Region(1, 2, 3, 4) + (10, 20) == Region(11, 22, 3, 4)
with pytest.raises(TypeError):
Region(1, 2, 3, 4) + "foo"
def test_region_sub():
assert Region(11, 22, 3, 4) - (10, 20) == Region(1, 2, 3, 4)
with pytest.raises(TypeError):
Reported by Pylint.
Line: 117
Column: 9
def test_region_sub():
assert Region(11, 22, 3, 4) - (10, 20) == Region(1, 2, 3, 4)
with pytest.raises(TypeError):
Region(1, 2, 3, 4) - "foo"
def test_region_overlaps():
assert Region(10, 10, 30, 20).overlaps(Region(0, 0, 20, 20))
assert not Region(10, 10, 5, 5).overlaps(Region(15, 15, 20, 20))
Reported by Pylint.
Line: 1
Column: 1
import pytest
from textual.geometry import clamp, Offset, Size, Region
def test_dimensions_region():
assert Size(30, 40).region == Region(0, 0, 30, 40)
Reported by Pylint.
Line: 6
Column: 1
from textual.geometry import clamp, Offset, Size, Region
def test_dimensions_region():
assert Size(30, 40).region == Region(0, 0, 30, 40)
def test_dimensions_contains():
assert Size(10, 10).contains(5, 5)
Reported by Pylint.
Line: 7
Suggestion:
https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html
def test_dimensions_region():
assert Size(30, 40).region == Region(0, 0, 30, 40)
def test_dimensions_contains():
assert Size(10, 10).contains(5, 5)
assert Size(10, 10).contains(9, 9)
Reported by Bandit.
src/textual/app.py
98 issues
Line: 9
Column: 1
from typing import Any, Callable, ClassVar, Type, TypeVar
import warnings
from rich.control import Control
import rich.repr
from rich.screen import Screen
from rich.console import Console, RenderableType
from rich.traceback import Traceback
Reported by Pylint.
Line: 10
Column: 1
import warnings
from rich.control import Control
import rich.repr
from rich.screen import Screen
from rich.console import Console, RenderableType
from rich.traceback import Traceback
from . import events
Reported by Pylint.
Line: 11
Column: 1
from rich.control import Control
import rich.repr
from rich.screen import Screen
from rich.console import Console, RenderableType
from rich.traceback import Traceback
from . import events
from . import actions
Reported by Pylint.
Line: 12
Column: 1
from rich.control import Control
import rich.repr
from rich.screen import Screen
from rich.console import Console, RenderableType
from rich.traceback import Traceback
from . import events
from . import actions
from ._animator import Animator
Reported by Pylint.
Line: 13
Column: 1
import rich.repr
from rich.screen import Screen
from rich.console import Console, RenderableType
from rich.traceback import Traceback
from . import events
from . import actions
from ._animator import Animator
from .binding import Bindings, NoBinding
Reported by Pylint.
Line: 15
Column: 1
from rich.console import Console, RenderableType
from rich.traceback import Traceback
from . import events
from . import actions
from ._animator import Animator
from .binding import Bindings, NoBinding
from .geometry import Offset, Region
from . import log
Reported by Pylint.
Line: 16
Column: 1
from rich.traceback import Traceback
from . import events
from . import actions
from ._animator import Animator
from .binding import Bindings, NoBinding
from .geometry import Offset, Region
from . import log
from ._callback import invoke
Reported by Pylint.
Line: 17
Column: 1
from . import events
from . import actions
from ._animator import Animator
from .binding import Bindings, NoBinding
from .geometry import Offset, Region
from . import log
from ._callback import invoke
from ._context import active_app
Reported by Pylint.
Line: 18
Column: 1
from . import events
from . import actions
from ._animator import Animator
from .binding import Bindings, NoBinding
from .geometry import Offset, Region
from . import log
from ._callback import invoke
from ._context import active_app
from ._event_broker import extract_handler_actions, NoHandler
Reported by Pylint.
Line: 19
Column: 1
from . import actions
from ._animator import Animator
from .binding import Bindings, NoBinding
from .geometry import Offset, Region
from . import log
from ._callback import invoke
from ._context import active_app
from ._event_broker import extract_handler_actions, NoHandler
from .driver import Driver
Reported by Pylint.
src/textual/geometry.py
93 issues
Line: 43
Column: 13
def __add__(self, other: object) -> Offset:
if isinstance(other, tuple):
_x, _y = self
x, y = other
return Offset(_x + x, _y + y)
return NotImplemented
def __sub__(self, other: object) -> Offset:
Reported by Pylint.
Line: 50
Column: 13
def __sub__(self, other: object) -> Offset:
if isinstance(other, tuple):
_x, _y = self
x, y = other
return Offset(_x - x, _y - y)
return NotImplemented
def blend(self, destination: Offset, factor: float) -> Offset:
Reported by Pylint.
Line: 65
Column: 9
Returns:
Point: A new point on a line between self and destination
"""
x1, y1 = self
x2, y2 = destination
return Offset(int(x1 + (x2 - x1) * factor), int((y1 + (y2 - y1) * factor)))
class Size(NamedTuple):
Reported by Pylint.
Line: 91
Column: 9
@property
def region(self) -> Region:
"""Get a region of the same size."""
width, height = self
return Region(0, 0, width, height)
def contains(self, x: int, y: int) -> bool:
"""Check if a point is in the size.
Reported by Pylint.
Line: 104
Column: 9
Returns:
bool: True if the point is within the region.
"""
width, height = self
return width > x >= 0 and height > y >= 0
def contains_point(self, point: tuple[int, int]) -> bool:
"""Check if a point is in the size.
Reported by Pylint.
Line: 117
Column: 9
bool: True if the point is within the region.
"""
x, y = point
width, height = self
return width > x >= 0 and height > y >= 0
def __contains__(self, other: Any) -> bool:
try:
x, y = other
Reported by Pylint.
Line: 127
Column: 9
raise TypeError(
"Dimensions.__contains__ requires an iterable of two integers"
)
width, height = self
return width > x >= 0 and height > y >= 0
class Region(NamedTuple):
"""Defines a rectangular region."""
Reported by Pylint.
Line: 225
Column: 9
Returns:
tuple[int, int, int, int]: A tuple of (<min x>, <max x>, <min y>, <max y>)
"""
x, y, width, height = self
return x, y, x + width, y + height
@property
def x_range(self) -> range:
return range(self.x, self.x + self.width)
Reported by Pylint.
Line: 239
Column: 13
def __add__(self, other: Any) -> Region:
if isinstance(other, tuple):
ox, oy = other
x, y, width, height = self
return Region(x + ox, y + oy, width, height)
return NotImplemented
def __sub__(self, other: Any) -> Region:
if isinstance(other, tuple):
Reported by Pylint.
Line: 246
Column: 13
def __sub__(self, other: Any) -> Region:
if isinstance(other, tuple):
ox, oy = other
x, y, width, height = self
return Region(x - ox, y - oy, width, height)
return NotImplemented
def overlaps(self, other: Region) -> bool:
"""Check if another region overlaps this region.
Reported by Pylint.
src/textual/events.py
83 issues
Line: 6
Column: 1
from asyncio import Event
from typing import Awaitable, Callable, Type, TYPE_CHECKING, TypeVar
import rich.repr
from rich.style import Style
from .geometry import Offset, Size
from .message import Message
from ._types import MessageTarget
Reported by Pylint.
Line: 7
Column: 1
from typing import Awaitable, Callable, Type, TYPE_CHECKING, TypeVar
import rich.repr
from rich.style import Style
from .geometry import Offset, Size
from .message import Message
from ._types import MessageTarget
from .keys import Keys
Reported by Pylint.
Line: 9
Column: 1
import rich.repr
from rich.style import Style
from .geometry import Offset, Size
from .message import Message
from ._types import MessageTarget
from .keys import Keys
MouseEventT = TypeVar("MouseEventT", bound="MouseEvent")
Reported by Pylint.
Line: 10
Column: 1
from rich.style import Style
from .geometry import Offset, Size
from .message import Message
from ._types import MessageTarget
from .keys import Keys
MouseEventT = TypeVar("MouseEventT", bound="MouseEvent")
Reported by Pylint.
Line: 11
Column: 1
from .geometry import Offset, Size
from .message import Message
from ._types import MessageTarget
from .keys import Keys
MouseEventT = TypeVar("MouseEventT", bound="MouseEvent")
if TYPE_CHECKING:
Reported by Pylint.
Line: 12
Column: 1
from .geometry import Offset, Size
from .message import Message
from ._types import MessageTarget
from .keys import Keys
MouseEventT = TypeVar("MouseEventT", bound="MouseEvent")
if TYPE_CHECKING:
from ._timer import Timer as TimerClass
Reported by Pylint.
Line: 17
Column: 5
MouseEventT = TypeVar("MouseEventT", bound="MouseEvent")
if TYPE_CHECKING:
from ._timer import Timer as TimerClass
from ._timer import TimerCallback
@rich.repr.auto
class Event(Message):
Reported by Pylint.
Line: 18
Column: 5
if TYPE_CHECKING:
from ._timer import Timer as TimerClass
from ._timer import TimerCallback
@rich.repr.auto
class Event(Message):
def __rich_repr__(self) -> rich.repr.Result:
Reported by Pylint.
Line: 22
Column: 1
@rich.repr.auto
class Event(Message):
def __rich_repr__(self) -> rich.repr.Result:
return
yield
def __init_subclass__(cls, bubble: bool = False, verbosity: int = 1) -> None:
Reported by Pylint.
Line: 25
Column: 9
class Event(Message):
def __rich_repr__(self) -> rich.repr.Result:
return
yield
def __init_subclass__(cls, bubble: bool = False, verbosity: int = 1) -> None:
super().__init_subclass__(bubble=bubble, verbosity=verbosity)
Reported by Pylint.
src/textual/widgets/_scroll_view.py
70 issues
Line: 4
Column: 1
from __future__ import annotations
from logging import PlaceHolder
from rich.console import RenderableType
from rich.style import StyleType
from .. import events
from ..layouts.grid import GridLayout
Reported by Pylint.
Line: 5
Column: 1
from logging import PlaceHolder
from rich.console import RenderableType
from rich.style import StyleType
from .. import events
from ..layouts.grid import GridLayout
from ..message import Message
Reported by Pylint.
Line: 8
Column: 1
from rich.style import StyleType
from .. import events
from ..layouts.grid import GridLayout
from ..message import Message
from ..messages import UpdateMessage
from ..scrollbar import ScrollTo, ScrollBar
from ..geometry import clamp, Offset, Size
Reported by Pylint.
Line: 9
Column: 1
from .. import events
from ..layouts.grid import GridLayout
from ..message import Message
from ..messages import UpdateMessage
from ..scrollbar import ScrollTo, ScrollBar
from ..geometry import clamp, Offset, Size
from ..page import Page
Reported by Pylint.
Line: 10
Column: 1
from .. import events
from ..layouts.grid import GridLayout
from ..message import Message
from ..messages import UpdateMessage
from ..scrollbar import ScrollTo, ScrollBar
from ..geometry import clamp, Offset, Size
from ..page import Page
from ..reactive import watch
Reported by Pylint.
Line: 11
Column: 1
from .. import events
from ..layouts.grid import GridLayout
from ..message import Message
from ..messages import UpdateMessage
from ..scrollbar import ScrollTo, ScrollBar
from ..geometry import clamp, Offset, Size
from ..page import Page
from ..reactive import watch
from ..view import View
Reported by Pylint.
Line: 12
Column: 1
from ..layouts.grid import GridLayout
from ..message import Message
from ..messages import UpdateMessage
from ..scrollbar import ScrollTo, ScrollBar
from ..geometry import clamp, Offset, Size
from ..page import Page
from ..reactive import watch
from ..view import View
from ..widget import Widget
Reported by Pylint.
Line: 13
Column: 1
from ..message import Message
from ..messages import UpdateMessage
from ..scrollbar import ScrollTo, ScrollBar
from ..geometry import clamp, Offset, Size
from ..page import Page
from ..reactive import watch
from ..view import View
from ..widget import Widget
Reported by Pylint.
Line: 14
Column: 1
from ..messages import UpdateMessage
from ..scrollbar import ScrollTo, ScrollBar
from ..geometry import clamp, Offset, Size
from ..page import Page
from ..reactive import watch
from ..view import View
from ..widget import Widget
from ..reactive import Reactive
Reported by Pylint.
Line: 15
Column: 1
from ..scrollbar import ScrollTo, ScrollBar
from ..geometry import clamp, Offset, Size
from ..page import Page
from ..reactive import watch
from ..view import View
from ..widget import Widget
from ..reactive import Reactive
Reported by Pylint.
src/textual/widget.py
68 issues
Line: 14
Column: 1
NewType,
cast,
)
import rich.repr
from rich import box
from rich.align import Align
from rich.console import Console, RenderableType
from rich.panel import Panel
from rich.padding import Padding, PaddingDimensions
Reported by Pylint.
Line: 15
Column: 1
cast,
)
import rich.repr
from rich import box
from rich.align import Align
from rich.console import Console, RenderableType
from rich.panel import Panel
from rich.padding import Padding, PaddingDimensions
from rich.pretty import Pretty
Reported by Pylint.
Line: 16
Column: 1
)
import rich.repr
from rich import box
from rich.align import Align
from rich.console import Console, RenderableType
from rich.panel import Panel
from rich.padding import Padding, PaddingDimensions
from rich.pretty import Pretty
from rich.style import Style
Reported by Pylint.
Line: 17
Column: 1
import rich.repr
from rich import box
from rich.align import Align
from rich.console import Console, RenderableType
from rich.panel import Panel
from rich.padding import Padding, PaddingDimensions
from rich.pretty import Pretty
from rich.style import Style
from rich.styled import Styled
Reported by Pylint.
Line: 18
Column: 1
from rich import box
from rich.align import Align
from rich.console import Console, RenderableType
from rich.panel import Panel
from rich.padding import Padding, PaddingDimensions
from rich.pretty import Pretty
from rich.style import Style
from rich.styled import Styled
from rich.text import TextType
Reported by Pylint.
Line: 19
Column: 1
from rich.align import Align
from rich.console import Console, RenderableType
from rich.panel import Panel
from rich.padding import Padding, PaddingDimensions
from rich.pretty import Pretty
from rich.style import Style
from rich.styled import Styled
from rich.text import TextType
Reported by Pylint.
Line: 20
Column: 1
from rich.console import Console, RenderableType
from rich.panel import Panel
from rich.padding import Padding, PaddingDimensions
from rich.pretty import Pretty
from rich.style import Style
from rich.styled import Styled
from rich.text import TextType
from . import events
Reported by Pylint.
Line: 21
Column: 1
from rich.panel import Panel
from rich.padding import Padding, PaddingDimensions
from rich.pretty import Pretty
from rich.style import Style
from rich.styled import Styled
from rich.text import TextType
from . import events
from ._animator import BoundAnimator
Reported by Pylint.
Line: 22
Column: 1
from rich.padding import Padding, PaddingDimensions
from rich.pretty import Pretty
from rich.style import Style
from rich.styled import Styled
from rich.text import TextType
from . import events
from ._animator import BoundAnimator
from ._context import active_app
Reported by Pylint.
Line: 23
Column: 1
from rich.pretty import Pretty
from rich.style import Style
from rich.styled import Styled
from rich.text import TextType
from . import events
from ._animator import BoundAnimator
from ._context import active_app
from .geometry import Size
Reported by Pylint.
src/textual/layout.py
68 issues
Line: 10
Column: 1
import sys
from typing import Iterable, Iterator, NamedTuple, TYPE_CHECKING
from rich import segment
import rich.repr
from rich.control import Control
from rich.console import Console, ConsoleOptions, RenderResult, RenderableType
from rich.segment import Segment, SegmentLines
Reported by Pylint.
Line: 12
Column: 1
from typing import Iterable, Iterator, NamedTuple, TYPE_CHECKING
from rich import segment
import rich.repr
from rich.control import Control
from rich.console import Console, ConsoleOptions, RenderResult, RenderableType
from rich.segment import Segment, SegmentLines
from rich.style import Style
Reported by Pylint.
Line: 13
Column: 1
from rich import segment
import rich.repr
from rich.control import Control
from rich.console import Console, ConsoleOptions, RenderResult, RenderableType
from rich.segment import Segment, SegmentLines
from rich.style import Style
from . import log, panic
Reported by Pylint.
Line: 14
Column: 1
import rich.repr
from rich.control import Control
from rich.console import Console, ConsoleOptions, RenderResult, RenderableType
from rich.segment import Segment, SegmentLines
from rich.style import Style
from . import log, panic
from ._loop import loop_last
Reported by Pylint.
Line: 15
Column: 1
import rich.repr
from rich.control import Control
from rich.console import Console, ConsoleOptions, RenderResult, RenderableType
from rich.segment import Segment, SegmentLines
from rich.style import Style
from . import log, panic
from ._loop import loop_last
from .layout_map import LayoutMap
Reported by Pylint.
Line: 16
Column: 1
from rich.control import Control
from rich.console import Console, ConsoleOptions, RenderResult, RenderableType
from rich.segment import Segment, SegmentLines
from rich.style import Style
from . import log, panic
from ._loop import loop_last
from .layout_map import LayoutMap
from ._profile import timer
Reported by Pylint.
Line: 18
Column: 1
from rich.segment import Segment, SegmentLines
from rich.style import Style
from . import log, panic
from ._loop import loop_last
from .layout_map import LayoutMap
from ._profile import timer
from ._lines import crop_lines
from ._types import Lines
Reported by Pylint.
Line: 19
Column: 1
from rich.style import Style
from . import log, panic
from ._loop import loop_last
from .layout_map import LayoutMap
from ._profile import timer
from ._lines import crop_lines
from ._types import Lines
Reported by Pylint.
Line: 20
Column: 1
from . import log, panic
from ._loop import loop_last
from .layout_map import LayoutMap
from ._profile import timer
from ._lines import crop_lines
from ._types import Lines
from .geometry import clamp, Region, Offset, Size
Reported by Pylint.
Line: 21
Column: 1
from . import log, panic
from ._loop import loop_last
from .layout_map import LayoutMap
from ._profile import timer
from ._lines import crop_lines
from ._types import Lines
from .geometry import clamp, Region, Offset, Size
Reported by Pylint.
src/textual/message_pump.py
60 issues
Line: 10
Column: 1
from typing import TYPE_CHECKING, Awaitable, Iterable, Callable
from weakref import WeakSet
from rich.traceback import Traceback
from . import events
from . import log
from ._timer import Timer, TimerCallback
from ._callback import invoke
Reported by Pylint.
Line: 12
Column: 1
from rich.traceback import Traceback
from . import events
from . import log
from ._timer import Timer, TimerCallback
from ._callback import invoke
from ._context import active_app
from .message import Message
Reported by Pylint.
Line: 13
Column: 1
from rich.traceback import Traceback
from . import events
from . import log
from ._timer import Timer, TimerCallback
from ._callback import invoke
from ._context import active_app
from .message import Message
Reported by Pylint.
Line: 14
Column: 1
from . import events
from . import log
from ._timer import Timer, TimerCallback
from ._callback import invoke
from ._context import active_app
from .message import Message
if TYPE_CHECKING:
Reported by Pylint.
Line: 15
Column: 1
from . import events
from . import log
from ._timer import Timer, TimerCallback
from ._callback import invoke
from ._context import active_app
from .message import Message
if TYPE_CHECKING:
from .app import App
Reported by Pylint.
Line: 16
Column: 1
from . import log
from ._timer import Timer, TimerCallback
from ._callback import invoke
from ._context import active_app
from .message import Message
if TYPE_CHECKING:
from .app import App
Reported by Pylint.
Line: 17
Column: 1
from ._timer import Timer, TimerCallback
from ._callback import invoke
from ._context import active_app
from .message import Message
if TYPE_CHECKING:
from .app import App
Reported by Pylint.
Line: 20
Column: 5
from .message import Message
if TYPE_CHECKING:
from .app import App
class NoParent(Exception):
pass
Reported by Pylint.
Line: 37
Column: 30
class MessagePump:
def __init__(self, parent: MessagePump | None = None) -> None:
self._message_queue: Queue[Message | None] = Queue()
self._parent = parent
self._running: bool = False
self._closing: bool = False
self._closed: bool = False
self._disabled_messages: set[type[Message]] = set()
Reported by Pylint.
Line: 45
Column: 28
self._disabled_messages: set[type[Message]] = set()
self._pending_message: Message | None = None
self._task: Task | None = None
self._child_tasks: WeakSet[Task] = WeakSet()
@property
def task(self) -> Task:
assert self._task is not None
return self._task
Reported by Pylint.
src/textual/scrollbar.py
58 issues
Line: 3
Column: 1
from __future__ import annotations
import rich.repr
from rich.color import Color
from rich.console import Console, ConsoleOptions, RenderResult, RenderableType
from rich.segment import Segment, Segments
from rich.style import Style, StyleType
from . import events
Reported by Pylint.
Line: 4
Column: 1
from __future__ import annotations
import rich.repr
from rich.color import Color
from rich.console import Console, ConsoleOptions, RenderResult, RenderableType
from rich.segment import Segment, Segments
from rich.style import Style, StyleType
from . import events
Reported by Pylint.
Line: 5
Column: 1
import rich.repr
from rich.color import Color
from rich.console import Console, ConsoleOptions, RenderResult, RenderableType
from rich.segment import Segment, Segments
from rich.style import Style, StyleType
from . import events
from .geometry import Offset
Reported by Pylint.
Line: 6
Column: 1
import rich.repr
from rich.color import Color
from rich.console import Console, ConsoleOptions, RenderResult, RenderableType
from rich.segment import Segment, Segments
from rich.style import Style, StyleType
from . import events
from .geometry import Offset
from ._types import MessageTarget
Reported by Pylint.
Line: 7
Column: 1
from rich.color import Color
from rich.console import Console, ConsoleOptions, RenderResult, RenderableType
from rich.segment import Segment, Segments
from rich.style import Style, StyleType
from . import events
from .geometry import Offset
from ._types import MessageTarget
from .message import Message
Reported by Pylint.
Line: 9
Column: 1
from rich.segment import Segment, Segments
from rich.style import Style, StyleType
from . import events
from .geometry import Offset
from ._types import MessageTarget
from .message import Message
from .widget import Reactive, Widget
Reported by Pylint.
Line: 10
Column: 1
from rich.style import Style, StyleType
from . import events
from .geometry import Offset
from ._types import MessageTarget
from .message import Message
from .widget import Reactive, Widget
Reported by Pylint.
Line: 11
Column: 1
from . import events
from .geometry import Offset
from ._types import MessageTarget
from .message import Message
from .widget import Reactive, Widget
@rich.repr.auto
Reported by Pylint.
Line: 12
Column: 1
from . import events
from .geometry import Offset
from ._types import MessageTarget
from .message import Message
from .widget import Reactive, Widget
@rich.repr.auto
class ScrollUp(Message, bubble=True):
Reported by Pylint.
Line: 13
Column: 1
from .geometry import Offset
from ._types import MessageTarget
from .message import Message
from .widget import Reactive, Widget
@rich.repr.auto
class ScrollUp(Message, bubble=True):
"""Message sent when clicking above handle."""
Reported by Pylint.