Drop using __file__ to work out the name of the CSS file

See https://github.com/Textualize/textual/pull/963#discussion_r1000546514

Personally I prefer the approach I was using in that it's one less bit of
hard-coded metadata. On the other hand I can appreciate that reducing the
number of possibly-confusing things in an example plays better with people
who may be both new to Textual *and* to Python.
This commit is contained in:
Dave Pearson
2022-10-20 14:26:28 +01:00
parent b19144abfe
commit 615a1997b9

View File

@@ -258,7 +258,7 @@ class FiveByFive(App[None]):
"""Main 5x5 application class."""
#: The name of the stylesheet for the app.
CSS_PATH = Path(__file__).with_suffix(".css")
CSS_PATH = "five_by_five.css"
#: The pre-loaded screens for the application.
SCREENS = {"help": Help()}