Make support/python/mkdocstrings_handlers/cxx/__init__.py PEP 8 compliant (2 of 2) (#4115)

* Change indents to 4 spaces.

* Run isort.

* Remove one extra space on the left hand side of each assignment at p.communicate's input.

* Remove 'from __future__ import annotations'.
This requires changing a 'list[]' into a 'List[]'.

We had previously added this import because the code was making use of operator '|'.
But that is no longer true, so the import shouldn't be needed.
This commit is contained in:
Roberto Turrado Camblor 2024-08-11 16:24:50 +02:00 committed by GitHub
parent 50a8c3e9bf
commit c71d03fcb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,13 +2,11 @@
# Copyright (c) 2012 - present, Victor Zverovich
# https://github.com/fmtlib/fmt/blob/master/LICENSE
from __future__ import annotations
import os
from pathlib import Path
from typing import Any, List, Mapping, Optional
from subprocess import CalledProcessError, PIPE, Popen, STDOUT
import xml.etree.ElementTree as ElementTree
from pathlib import Path
from subprocess import PIPE, STDOUT, CalledProcessError, Popen
from typing import Any, List, Mapping, Optional
from mkdocstrings.handlers.base import BaseHandler
@ -105,7 +103,7 @@ def convert_type(type_: ElementTree.Element) -> Optional[str]:
return normalize_type(result)
def convert_params(func: ElementTree.Element) -> list[Definition]:
def convert_params(func: ElementTree.Element) -> List[Definition]:
params = []
for p in func.findall('param'):
d = Definition(p.find('declname').text, 'param')