diff --git a/server/galaxyls/services/xml/parser.py b/server/galaxyls/services/xml/parser.py index 087eabc..f41490b 100644 --- a/server/galaxyls/services/xml/parser.py +++ b/server/galaxyls/services/xml/parser.py @@ -4,23 +4,12 @@ Only the minimum subset of the XML dialect used by Galaxy tool wrappers is supported. """ -from typing import ( - Optional, - cast, -) +from typing import Optional, cast from pygls.workspace import Document from .document import XmlDocument -from .nodes import ( - XmlAttribute, - XmlCDATASection, - XmlComment, - XmlContent, - XmlElement, - XmlProcessingInstruction, - XmlSyntaxNode, -) +from .nodes import XmlAttribute, XmlCDATASection, XmlComment, XmlContent, XmlElement, XmlProcessingInstruction, XmlSyntaxNode from .scanner import XmlScanner from .types import TokenType @@ -31,7 +20,6 @@ class XmlDocumentParser: If the document is incomplete or malformed, the parser will try to recover the syntax tree in those cases without altering the original offsets of the nodes.""" - # flake8: noqa: C901 def parse(self, document: Document) -> XmlDocument: """Parses the given text document and returns the resulting syntax tree as a XmlDocument. diff --git a/server/galaxyls/services/xml/scanner.py b/server/galaxyls/services/xml/scanner.py index 69d1085..21eba8e 100644 --- a/server/galaxyls/services/xml/scanner.py +++ b/server/galaxyls/services/xml/scanner.py @@ -21,10 +21,7 @@ PI_END_CHAR_SEQ, QUOTE_CHARS, ) -from .types import ( - ScannerState, - TokenType, -) +from .types import ScannerState, TokenType from .utils import MultiLineStream ERROR_UNEXPECTED_WHITESPACE = "Unexpected whitespace. Tag name must directly follow the open angle bracket." @@ -72,7 +69,6 @@ def _finish_token(self, offset: int, type: TokenType, error_message: Optional[st self.token_error = error_message return type - # flake8: noqa: C901 def _internal_scan(self) -> TokenType: """Scans the document for the next token.