TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
Closed this issue · 1 comments
scriptzteam commented
python3
Python 3.8.10 (default, Nov 22 2023, 10:22:35)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from plemmy import LemmyHttp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/dist-packages/plemmy/__init__.py", line 3, in <module>
from . import objects
File "/usr/local/lib/python3.8/dist-packages/plemmy/objects.py", line 196, in <module>
class Instance:
File "/usr/local/lib/python3.8/dist-packages/plemmy/objects.py", line 205, in Instance
federation_state: FederationState | None = None
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
tjkessler commented
The pipe operator is available in Python 3.10+, and is unsupported in Python 3.8: https://stackoverflow.com/questions/64615988/what-does-vertical-bar-pipe-in-function-arguments-type-annotations-mean