Skip to content

Commit

Permalink
Merge pull request #1826 from strictdoc-project/stanislaw/statement
Browse files Browse the repository at this point in the history
Code climate: backend/sdoc: free_text: fix all mypy issues
  • Loading branch information
stanislaw authored May 19, 2024
2 parents d2e1116 + 2e314d9 commit bd0968d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions strictdoc/backend/sdoc/models/free_text.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# mypy: disable-error-code="no-untyped-def,type-arg"
import html
from typing import List
from typing import List, Any, Optional

from strictdoc.backend.sdoc.models.anchor import Anchor
from strictdoc.backend.sdoc.models.inline_link import InlineLink
@@ -9,22 +8,22 @@

@auto_described
class FreeText:
def __init__(self, parent, parts: List):
def __init__(self, parent: Any, parts: List[Any]) -> None:
assert isinstance(parts, list)
self.parent = parent
self.parts = parts
self.ng_level = None

@property
def parent_or_including_document(self):
def parent_or_including_document(self) -> Optional[Any]:
return self.parent.parent_or_including_document

@property
def is_requirement(self):
def is_requirement(self) -> bool:
return False

@property
def is_section(self):
def is_section(self) -> bool:
return False

def get_parts_as_text(self) -> str:
@@ -55,5 +54,5 @@ def get_parts_as_text_escaped(self) -> str:


class FreeTextContainer(FreeText):
def __init__(self, parts):
def __init__(self, parts: List[Any]) -> None:
super().__init__(None, parts)

0 comments on commit bd0968d

Please sign in to comment.