mark intentionally unused args

This commit is contained in:
Jan Petykiewicz 2024-07-28 20:04:15 -07:00
parent 4c69e773fd
commit 8035daee7e
4 changed files with 13 additions and 13 deletions

View File

@ -223,8 +223,8 @@ class Tool:
self,
batch: Sequence[RenderStep],
*,
port_names: Sequence[str] = ('A', 'B'),
**kwargs,
port_names: Sequence[str] = ('A', 'B'), # noqa: ARG002 (unused)
**kwargs, # noqa: ARG002 (unused)
) -> ILibrary:
"""
Render the provided `batch` of `RenderStep`s into geometry, returning a tree
@ -313,7 +313,7 @@ class BasicTool(Tool, metaclass=ABCMeta):
*,
in_ptype: str | None = None,
out_ptype: str | None = None,
**kwargs,
**kwargs, # noqa: ARG002 (unused)
) -> tuple[Port, LData]:
# TODO check all the math for L-shaped bends
if ccw is not None:
@ -455,7 +455,7 @@ class PathTool(Tool, metaclass=ABCMeta):
in_ptype: str | None = None,
out_ptype: str | None = None,
port_names: tuple[str, str] = ('A', 'B'),
**kwargs,
**kwargs, # noqa: ARG002 (unused)
) -> Library:
out_port, dxy = self.planL(
ccw,
@ -486,9 +486,9 @@ class PathTool(Tool, metaclass=ABCMeta):
ccw: SupportsBool | None,
length: float,
*,
in_ptype: str | None = None,
in_ptype: str | None = None, # noqa: ARG002 (unused)
out_ptype: str | None = None,
**kwargs,
**kwargs, # noqa: ARG002 (unused)
) -> tuple[Port, NDArray[numpy.float64]]:
# TODO check all the math for L-shaped bends
@ -522,7 +522,7 @@ class PathTool(Tool, metaclass=ABCMeta):
batch: Sequence[RenderStep],
*,
port_names: Sequence[str] = ('A', 'B'),
**kwargs,
**kwargs, # noqa: ARG002 (unused)
) -> ILibrary:
path_vertices = [batch[0].start_port.offset]

View File

@ -119,10 +119,10 @@ class Circle(Shape):
return numpy.vstack((self.offset - self.radius,
self.offset + self.radius))
def rotate(self, theta: float) -> 'Circle':
def rotate(self, theta: float) -> 'Circle': # noqa: ARG002 (theta unused)
return self
def mirror(self, axis: int = 0) -> 'Circle':
def mirror(self, axis: int = 0) -> 'Circle': # noqa: ARG002 (axis unused)
self.offset *= -1
return self

View File

@ -358,8 +358,8 @@ class Polygon(Shape):
def to_polygons(
self,
num_vertices: int | None = None, # unused
max_arclen: float | None = None, # unused
num_vertices: int | None = None, # unused # noqa: ARG002
max_arclen: float | None = None, # unused # noqa: ARG002
) -> list['Polygon']:
return [copy.deepcopy(self)]

View File

@ -132,8 +132,8 @@ class Text(RotatableImpl, Shape):
def to_polygons(
self,
num_vertices: int | None = None, # unused
max_arclen: float | None = None, # unused
num_vertices: int | None = None, # unused # noqa: ARG002
max_arclen: float | None = None, # unused # noqa: ARG002
) -> list[Polygon]:
all_polygons = []
total_advance = 0.0