Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' #35

Closed
scriptzteam opened this issue Apr 1, 2024 · 1 comment
Closed

Comments

@scriptzteam
Copy link

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
Copy link
Collaborator

@scriptzteam,

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

@tjkessler tjkessler mentioned this issue Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants