Commit Graph

26 Commits

Author SHA1 Message Date
Shantanu
b7d927a53f random: update for py312 (#10214)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-25 18:49:51 +01:00
Sebastian Rittau
027460f11a Remove unnecessary ellipsis expressions (#9976)
Ignore flake8 F821 warnings in stub files
2023-03-29 13:28:06 +02:00
Alex Waygood
33a62ae42d Add more defaults to the stdlib (#9606)
Continuing work towards #8988.

The first five commits were created using stubdefaulter on various Python versions; the following commits were all created manually by me to fix various problems. The main things this adds that weren't present in #9501 are:

- Defaults in Windows-only modules and Windows-only branches (because I'm running a Windows machine)
- Defaults in non-py311 branches
- Defaults for float parameters
- Defaults for overloads
2023-01-29 01:51:23 +00:00
Jelle Zijlstra
ddfaca3200 stdlib: add argument default values (#9501) 2023-01-18 09:37:34 +01:00
Nikita Sobolev
0259068ad6 Remove duplicate definitions in sub-classes (#8594) 2022-08-26 17:10:55 +02:00
Alex Waygood
591593c85f Simplify __all__ for modules beginning with 'm' to 't' (#8028) 2022-06-07 20:14:15 +01:00
Shantanu
f2ea124e82 random: explicitly mention int for seed (#7916)
https://github.com/python/typeshed/pull/7906#discussion_r878750404
I felt this better documents how seed is used in practice

Co-authored-by: hauntsaninja <>
2022-05-21 13:00:05 -07:00
Alex Waygood
76a4bd796b Simplify and correct many numeric unions (#7906)
Unblocks PyCQA/flake8-pyi#222
2022-05-21 15:25:00 +01:00
Shantanu
145a85307a random: update for py311 (#7651) 2022-04-17 01:01:36 +01:00
Harry
eb252afb18 random.sample no longer accepts sets in Python 3.11 (#7528)
As of 3.11, population must be a Sequence. Automatic conversion of sets to lists is no longer supported.
2022-03-21 18:58:22 -07:00
Harry
71d14b3ee1 random.sample: counts takes Iterable[int] (#7527) 2022-03-21 18:18:24 -07:00
Shantanu
ebcfe7bc4e random: use bound methods (#7408) 2022-03-01 09:27:44 +01:00
Shantanu
b5f32a609a random: add new default args in py311 (#7400) 2022-03-01 00:19:05 +02:00
Alex Waygood
a3bb5af4a0 Add __all__ to most modules beginning with 'q', 'r' and 's' (#7364) 2022-02-22 16:51:54 -08:00
Shantanu
b88a6f19cd Upgrade black version (#7089) 2022-01-30 16:27:06 -08:00
Nikita Sobolev
e553f8cb5a Use stricter Random.seed type (#6924) 2022-01-19 22:23:41 -08:00
Alex Waygood
8d5d2520ac Use PEP 585 syntax wherever possible (#6717) 2021-12-28 11:31:43 +01:00
Jukka Lehtosalo
78806f5402 Use AbstractSet instead of set in random and inspect (#6574) 2021-12-13 17:26:28 +01:00
Jelle Zijlstra
943dc5f61d More permissive type for random.choice and related functions (#6562) 2021-12-10 19:50:02 +01:00
Shantanu
2a1ef3735d random: add VERSION, SystemRandom.getrandbits is not pos only (#6419)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-05 16:52:34 +02:00
Alex Waygood
5c8e68f0eb Use lowercase set, frozenset and deque where possible (#6346) 2021-11-19 15:05:45 -08:00
Akuli
ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02:00
jack1142
0209b6f95f random.choices: weights can be Fractions (#5587) 2021-06-06 21:39:31 -07:00
hatal175
fbf21995e3 Various stubtest fixes (#5230) 2021-04-18 09:30:00 -07:00
Sebastian Rittau
c21329b68a Recommend using PEP 585 (#5055)
* Remove conventions enforced by black

Remove old note about optional default arguments (now part of
PEP 484 and enforced by CI)

* Recommend to use PEP 585

Cf. #4820

* Try out using collections.abc

* Reference mypy bug
2021-02-23 16:41:31 -08:00
Ivan Levkivskyi
16ae4c6120 Re-organize directory structure (#4971)
See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-27 12:00:39 +00:00