textual icon indicating copy to clipboard operation
textual copied to clipboard

[CSS Branch] TypeError in _style_properties.py

Open lllama opened this issue 3 years ago • 2 comments

On line 645:

return cast(tuple[str, ...], obj.get_rule(self.name, ()))

the call to cast raises a TypeError on python 3.8 and lower. Bumping to python 3.9 removes the error. Raising the issue as pyproject.toml has python 3.7 or newer specified.

lllama avatar Apr 25 '22 10:04 lllama

You can simply stringify the cast argument:

return cast('tuple[str, ...]', obj.get_rule(self.name, ()))

Feel free to open up a PR doing this @lllama

tusharsadhwani avatar Apr 25 '22 10:04 tusharsadhwani

Done in #415

lllama avatar Apr 25 '22 10:04 lllama

https://github.com/Textualize/textual/wiki/Sorry-we-closed-your-issue

willmcgugan avatar Oct 25 '22 09:10 willmcgugan

Did we solve your problem?

Glad we could help!

github-actions[bot] avatar Oct 25 '22 09:10 github-actions[bot]