mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Use more efficient bool to int conversion
This commit is contained in:
@@ -2,5 +2,5 @@
|
||||
height: 50%;
|
||||
width: 50%;
|
||||
align: center middle;
|
||||
background: blue;
|
||||
background: green;
|
||||
}
|
||||
|
||||
@@ -530,7 +530,11 @@ class Styles(StylesBase):
|
||||
rules = [
|
||||
(
|
||||
rule_name,
|
||||
(int(not is_widget_rule), int(is_important(rule_name)), *specificity),
|
||||
(
|
||||
0 if is_widget_rule else 1,
|
||||
1 if is_important(rule_name) else 0,
|
||||
*specificity,
|
||||
),
|
||||
rule_value,
|
||||
)
|
||||
for rule_name, rule_value in self._rules.items()
|
||||
|
||||
Reference in New Issue
Block a user