| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
This code: ```python from rstr import Rstr from random import SystemRandom Rstr(SystemRandom()) ``` Fails to pass pyright tests. `_Random.shuffle()` expects two arguments, one optional, but since Python 3.11 `Random.shuffle()` only takes one argument. No need to add version-specific code: the new version works OK with Python < 3.11. Ref: python/cpython#25874
This code: ```python from rstr import Rstr from random import SystemRandom Rstr(SystemRandom()) ``` Fails to pass pyright tests. `_Random.shuffle()` expects two arguments, one optional, but since Python 3.11 `Random.shuffle()` only takes one argument (see python/cpython#25874). typeshed includes a stub for Random, so it's now possible to use it directly instead of maintaining a custom stub for it.
This code: ```python from rstr import Rstr from random import SystemRandom Rstr(SystemRandom()) ``` Fails to pass pyright tests. `_Random.shuffle()` expects two arguments, one optional, but since Python 3.11 `Random.shuffle()` only takes one argument (see python/cpython#25874). typeshed includes a stub for Random, so it's now possible to use it directly instead of maintaining a custom stub for it.
| 'supported seed types are: None, ' | ||
| 'int, float, str, bytes, and bytearray.', | ||
| DeprecationWarning, 2) | ||
| raise TypeError('The only supported seed types are: None,\n' |
There was a problem hiding this comment.
Is the newline in the middle of the error message intentional? It reads awkward to the user.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
https://bugs.python.org/issue40465