Commit Graph

17 Commits

Author SHA1 Message Date
Shantanu
470a13ab09 Use PEP 570 syntax in stdlib (#11250) 2024-03-09 14:50:16 -08:00
M Bussonnier
edf41ae5e2 Update type of Formatter.convert_field (missing |None) (#11377)
From the source it expects that the second parameter (conversion), can
be None:

```python
   def convert_field(self, value, conversion):
        # do any conversion on the resulting object
        if conversion is None:
            return value
   ...
```

Since at least 17 years according to git blame, as None is refered as
early as 11529195cae2438a3ac003babcb1b11af67c4037
And still present in main branch:

ef3ceab09d/Lib/string.py
2024-02-07 19:24:21 +00:00
Alex Waygood
dd2818a41d Stdlib: add container default values (#9909) 2023-03-21 09:12:34 +01:00
Jelle Zijlstra
ddfaca3200 stdlib: add argument default values (#9501) 2023-01-18 09:37:34 +01:00
chaojie
620e37fd02 Add type-hints for _vformat in string.Formatter (#9228) 2022-11-20 18:22:36 -08:00
Nikita Sobolev
6e84b56016 Add metaclasses for string.Template and dataclasses.InitVar (#8852) 2022-10-05 14:41:24 -07:00
Nikita Sobolev
d987f92e55 string.Template: Make several attributes ClassVars (#8724) 2022-09-11 14:29:31 +01:00
Shantanu
4b184356f1 string: remove stray comment (#8329) 2022-07-18 19:53:15 -07:00
Graham Bleaney
9519e3652b Add LiteralString support to string module (#8268)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-07-18 19:34:27 -07:00
Alex Waygood
6348a58b8b Import Match and Pattern from re, not typing (#8277) 2022-07-12 15:32:48 +02:00
Alex Waygood
acc0167dc1 Fix several new-in-3.11 stubtest errors (#7973) 2022-06-02 18:07:38 -07:00
Alex Waygood
97a74bc1aa Import from collections.abc wherever possible (#7635) 2022-04-18 12:50:37 +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
Akuli
994b69ef8f Use lowercase tuple where possible (#6170) 2021-10-14 17:18:19 -07:00
Kevin Rose
47e9788246 Add the rest of string.Template's class attributes (#6109) 2021-10-05 18:26:34 +02:00
Akuli
ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02: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