Skip to content

Commit

Permalink
Fixed more Pylint Python 3.8 issues
Browse files Browse the repository at this point in the history
Signed-off-by: Bhavye Mathur <[email protected]>
  • Loading branch information
BhavyeMathur committed Jan 10, 2024
1 parent 5eb351f commit 1cefedc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions goopylib/layout/_internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import Union, Literal, get_args

# pylint: disable=invalid-name
# pylint: disable-next=unsubscriptable-object
# pylint: disable=unsubscriptable-object

_UNITS = Literal["px", "%", "auto"]
_LRTB_SETTER_TYPE = Union[int, tuple[int], tuple[int, int], tuple[int, int, int], tuple[int, int, int, int]]
Expand Down Expand Up @@ -203,15 +203,13 @@ def height(self, value: int):
self._y2 = self._y1 + value
self._height = value

# pylint: disable-next=unsubscriptable-object
@property
def start(self) -> tuple[int, int]:
"""
The start coordinates (x, y) of the box
"""
return self._x1, self._y1

# pylint: disable-next=unsubscriptable-object
@property
def end(self) -> tuple[int, int]:
"""
Expand Down Expand Up @@ -249,7 +247,6 @@ def unit(self) -> _UNITS:
"""
return self._unit

# pylint: disable-next=unsubscriptable-object
@staticmethod
def _parse_dimension(dim: str | int) -> tuple[int, _UNITS]:
if dim == "auto":
Expand All @@ -263,3 +260,6 @@ def _parse_dimension(dim: str | int) -> tuple[int, _UNITS]:
return int(dim[:-len(unit)]), unit

raise ValueError(dim)


# pylint: enable=unsubscriptable-object

0 comments on commit 1cefedc

Please sign in to comment.