Skip to content

Commit

Permalink
chore: Remove unneeded imports and "pylint: disable" comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ewuerger authored and Wuestengecko committed Jan 16, 2024
1 parent b539aaa commit 765c998
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion capellambse/aird/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def _topsection_size(self) -> diagram.Vector2D:
width = max(map(operator.attrgetter("size.x"), self.children))
except ValueError:
width = 0
# pylint: disable=unpacking-non-sequence # false-positive
pad_x, pad_y = self.padding * 2
if isinstance(self.label, str):
label_extent = helpers.get_text_extent(
Expand Down
1 change: 0 additions & 1 deletion capellambse/diagram/_diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ def size(self) -> diagram.Vector2D:
return self._size

if isinstance(self.label, str):
# pylint: disable=unpacking-non-sequence # false-positive
pad_w, pad_h = self.padding * 2 # Pad on all four sides

# Fill in missing box size fields based on label text extent
Expand Down
2 changes: 1 addition & 1 deletion capellambse/model/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def set_self_references(*args: tuple[type[ModelObject], str]) -> None:
set_accessor(cls, attr, DirectProxyAccessor(cls, aslist=ElementList))


def xtype_handler( # pylint: disable=keyword-arg-before-vararg # PEP-570
def xtype_handler(
arch: str | None = None, /, *xtypes: str
) -> cabc.Callable[[type[T]], type[T]]:
"""Register a class as handler for a specific ``xsi:type``.
Expand Down
1 change: 0 additions & 1 deletion capellambse/model/common/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,6 @@ def __init__(
mapkey: str | None = None,
mapvalue: str | None = None,
) -> None:
# pylint: disable=assigning-non-slot # false-positive
self._model = model
self._elements = elements
if elemclass is not None:
Expand Down
1 change: 0 additions & 1 deletion capellambse/svg/decorations.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import dataclasses
import logging
import re
import typing as t

logger = logging.getLogger(__name__)

Expand Down

0 comments on commit 765c998

Please sign in to comment.