Skip to content

Commit

Permalink
typing
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Oct 29, 2024
1 parent 1d08b1d commit c8db1d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/textual/css/stylesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from itertools import chain
from operator import itemgetter
from pathlib import Path, PurePath
from typing import Iterable, NamedTuple, Sequence, cast
from typing import Final, Iterable, NamedTuple, Sequence, cast

import rich.repr
from rich.console import Console, ConsoleOptions, RenderableType, RenderResult
Expand Down Expand Up @@ -435,7 +435,7 @@ def _check_rule(

# pseudo classes which iterate over multiple nodes
# These shouldn't be used in a cache key
EXCLUDE_PSEUDO_CLASSES_FROM_CACHE = {
_EXCLUDE_PSEUDO_CLASSES_FROM_CACHE: Final[set[str]] = {
"first-of-type",
"last-of_type",
"odd",
Expand Down Expand Up @@ -488,7 +488,7 @@ def apply(
cache_key: tuple | None = None

if cache is not None and all_pseudo_classes.isdisjoint(
self.EXCLUDE_PSEUDO_CLASSES_FROM_CACHE
self._EXCLUDE_PSEUDO_CLASSES_FROM_CACHE
):
cache_key = (
node._parent,
Expand Down

0 comments on commit c8db1d6

Please sign in to comment.