|
14 | 14 | from typing import Literal # type: ignore |
15 | 15 | except ImportError: |
16 | 16 | # https://github.com/python/mypy/issues/8520 |
17 | | - from typing_extensions import Literal # type: ignore # noqa: WPS440 |
| 17 | + from typing_extensions import Literal # type: ignore # noqa: WPS440 |
18 | 18 |
|
19 | 19 |
|
20 | 20 | # TODO: Examples: from the documentation, I'm not sure there is a standard format for examples |
@@ -116,13 +116,13 @@ def __init__(self) -> None: |
116 | 116 | self._parsed_values: ParsedValues = ParsedValues() |
117 | 117 | # Ordering is significant so that directives like ":vartype" are checked before ":var" |
118 | 118 | self.field_types = [ |
119 | | - FieldType(PARAM_TYPE_NAMES, self._read_parameter_type), # type: ignore |
120 | | - FieldType(PARAM_NAMES, self._read_parameter), # type: ignore |
121 | | - FieldType(ATTRIBUTE_TYPE_NAMES, self._read_attribute_type), # type: ignore |
122 | | - FieldType(ATTRIBUTE_NAMES, self._read_attribute), # type: ignore |
123 | | - FieldType(EXCEPTION_NAMES, self._read_exception), # type: ignore |
124 | | - FieldType(RETURN_NAMES, self._read_return), # type: ignore |
125 | | - FieldType(RETURN_TYPE_NAMES, self._read_return_type), # type: ignore |
| 119 | + FieldType(PARAM_TYPE_NAMES, self._read_parameter_type), |
| 120 | + FieldType(PARAM_NAMES, self._read_parameter), |
| 121 | + FieldType(ATTRIBUTE_TYPE_NAMES, self._read_attribute_type), |
| 122 | + FieldType(ATTRIBUTE_NAMES, self._read_attribute), |
| 123 | + FieldType(EXCEPTION_NAMES, self._read_exception), |
| 124 | + FieldType(RETURN_NAMES, self._read_return), |
| 125 | + FieldType(RETURN_TYPE_NAMES, self._read_return_type), |
126 | 126 | ] |
127 | 127 |
|
128 | 128 | def parse_sections(self, docstring: str) -> List[Section]: # noqa: D102 |
@@ -443,10 +443,10 @@ def _parse_directive(self, lines: List[str], start_index: int) -> ParsedDirectiv |
443 | 443 | _, directive, value = line.split(":", 2) |
444 | 444 | except ValueError: |
445 | 445 | self.error(f"Failed to get ':directive: value' pair from '{line}'") |
446 | | - return ParsedDirective(line, next_index, [], "", invalid=True) # type: ignore |
| 446 | + return ParsedDirective(line, next_index, [], "", invalid=True) |
447 | 447 |
|
448 | 448 | value = value.strip() |
449 | | - return ParsedDirective(line, next_index, directive.split(" "), value) # type: ignore |
| 449 | + return ParsedDirective(line, next_index, directive.split(" "), value) |
450 | 450 |
|
451 | 451 |
|
452 | 452 | def _consolidate_continuation_lines(lines: List[str], start_index: int) -> Tuple[str, int]: |
|
0 commit comments