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
This commit is contained in:
M Bussonnier
2024-02-07 11:24:21 -08:00
committed by GitHub
parent 994d22bfbb
commit edf41ae5e2

View File

@@ -80,4 +80,4 @@ class Formatter:
def get_value(self, key: int | str, args: Sequence[Any], kwargs: Mapping[str, Any]) -> Any: ...
def check_unused_args(self, used_args: set[int | str], args: Sequence[Any], kwargs: Mapping[str, Any]) -> None: ...
def format_field(self, value: Any, format_spec: str) -> Any: ...
def convert_field(self, value: Any, conversion: str) -> Any: ...
def convert_field(self, value: Any, conversion: str | None) -> Any: ...