Skip to content

Commit

Permalink
Remove unused flake8: noqa: C901 rule overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed Aug 17, 2024
1 parent 6a034a9 commit a5b17c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
16 changes: 2 additions & 14 deletions server/galaxyls/services/xml/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down
6 changes: 1 addition & 5 deletions server/galaxyls/services/xml/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit a5b17c2

Please sign in to comment.