You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ .talon/bin/repl
Talon REPL | Python 3.9.1 (default, Dec 11 2020, 06:21:58) [GCC 7.5.0] on linux)
>>> from talon.ui import Rect
>>> r = Rect(0,0,1,1)
>>> r == None
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "talon/skia/rect.py", line 57, in __eq__
AttributeError: 'NoneType' object has no attribute 'x'
>>> None == r
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "talon/skia/rect.py", line 57, in __eq__
AttributeError: 'NoneType' object has no attribute 'x'
The text was updated successfully, but these errors were encountered:
Yes I am aware that you should use is to explicitly check for None, the above was just a simple PoC. The actual code that had this problem was comparing two variables where one was of type r: Rect and the other was t: Optional[Rect]. So my workaround for now is a simple change from r == t to t is not None and r == t.
This seems to be a bug introduced with
0.1.3
.Easily reproducible PoC:
Result:
The text was updated successfully, but these errors were encountered: