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

View File

@ -119,10 +119,10 @@ class Circle(Shape):
return numpy.vstack((self.offset - self.radius, return numpy.vstack((self.offset - self.radius,
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 return self
def mirror(self, axis: int = 0) -> 'Circle': def mirror(self, axis: int = 0) -> 'Circle': # noqa: ARG002 (axis unused)
self.offset *= -1 self.offset *= -1
return self return self

View File

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

View File

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