Comments (5)
Thank you for your issue. Give us a little time to review it.
PS. You might want to check the FAQ if you haven't done so already.
This is an automated reply, generated by FAQtory
from textual.
Directly setting self.dark to False will raise a type-check lint:
from textual.
Dark should be Reactive
as it is a reactive. Moreover, setting dark
to False
has the desired effect with this code:
from textual.app import App, ComposeResult
from textual.widgets import Label
class LightApp(App[None]):
def __init__(self):
super().__init__()
self.dark = False
def compose(self) -> ComposeResult:
yield Label("This is a light app")
if __name__ == "__main__":
LightApp().run()
I also see no type issues with the code (in this case using pyright):
It might be a good idea to say what you're using for type checking, and perhaps which IDE you're using. For example, the type checker in (some versions of?) PyCharm are known to be lacking a little and sometimes can mislead people.
from textual.
Yeah, PyCharm doesn't understand descriptors all that well. @Haphaistos2333 feel free to report this to the PyCharm folks.
from textual.
Don't forget to star the repository!
Follow @textualizeio for Textual updates.
from textual.
Related Issues (20)
- Command palette glitch HOT 5
- Command palette cancel HOT 3
- Change command palette key HOT 5
- Watch Highlander for the first time HOT 5
- Make tooltip timer confugrable HOT 2
- Pytest gets stuck when testing app with dynamically mounting animated widgets on timer HOT 5
- v0.76.0 breaks buttons with emojis HOT 7
- self test problems HOT 6
- Investigate flaky `test_command_palette_dismiss_escape_no_results` snapshot test HOT 3
- Inline mode doesn't show CSS errors HOT 3
- Extraneous padding when using inline mode HOT 7
- InvalidStateError when dismissing Screen HOT 5
- Mouse enter in a child widget triggers Leave event in parent HOT 5
- `COMMAND_PALETTE_BINDING` doesn't change the binding HOT 1
- Worker on cancelled don't stop running HOT 2
- Don't allow screen instances in App.SCREENS HOT 4
- Log slow message processing HOT 2
- Question: How do I style within TabbedContent? HOT 16
- Include installing async plugin in Testing docs HOT 2
- Introduce global app-idle state/callback HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from textual.