mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-19 11:14:41 +00:00
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:
parent
50a8c3e9bf
commit
c71d03fcb0
@ -2,13 +2,11 @@
|
|||||||
# Copyright (c) 2012 - present, Victor Zverovich
|
# Copyright (c) 2012 - present, Victor Zverovich
|
||||||
# https://github.com/fmtlib/fmt/blob/master/LICENSE
|
# https://github.com/fmtlib/fmt/blob/master/LICENSE
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import os
|
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
|
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
|
from mkdocstrings.handlers.base import BaseHandler
|
||||||
|
|
||||||
@ -105,7 +103,7 @@ def convert_type(type_: ElementTree.Element) -> Optional[str]:
|
|||||||
return normalize_type(result)
|
return normalize_type(result)
|
||||||
|
|
||||||
|
|
||||||
def convert_params(func: ElementTree.Element) -> list[Definition]:
|
def convert_params(func: ElementTree.Element) -> List[Definition]:
|
||||||
params = []
|
params = []
|
||||||
for p in func.findall('param'):
|
for p in func.findall('param'):
|
||||||
d = Definition(p.find('declname').text, 'param')
|
d = Definition(p.find('declname').text, 'param')
|
||||||
|
Loading…
Reference in New Issue
Block a user