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
Given that the documentation states the following, the error makes sense:
Note that Lock is actually a factory function which returns an instance of the most efficient version of the concrete Lock class that is supported by the platform.
I actually didn't know it was a factory function. I would not intentionally create a <function> | None type. But since the documentation describes threading.Lock as a class, one would expect to be able to use it as any other type.
Activity
Fix threading.Lock | None error
feat: Activate ruff rules UP(pyupgrade) (#3871)
feat: Activate ruff rules UP(pyupgrade) (langflow-ai#3871)
see issue python/cpython#114315
Prevent Optional[RLock] to be fixed
Prevent Optional[RLock] to be fixed
Prevent Optional[RLock] to be fixed
Prevent Optional[RLock] to be fixed
Prevent Optional[RLock] to be fixed
Prevent Optional[RLock] to be fixed
Prevent Optional[RLock] to be fixed
Prevent Optional[RLock] to be fixed
Prevent Optional[RLock] to be fixed
fix: wrap threading Timer, Lock in quotes
creating a type union with the pipe operator is not support by thread…
creating a type union with the pipe operator is not support by thread…
see issue python/cpython#114315
see issue python/cpython#114315
feat: Activate ruff rules UP(pyupgrade) (#3871)