-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move CoordinateX,Y,I,J to separate modules
- Loading branch information
Showing
11 changed files
with
306 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""`pygerber.nodes.other.CoordinateI` module contains definition of `CoordinateI` | ||
class which represent Ixx...x packed coordinates. | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
from typing import TYPE_CHECKING, Callable | ||
|
||
from pygerber.gerber.ast.nodes.other.coordinate import Coordinate | ||
|
||
if TYPE_CHECKING: | ||
from typing_extensions import Self | ||
|
||
from pygerber.gerber.ast.ast_visitor import AstVisitor | ||
|
||
|
||
class CoordinateI(Coordinate): | ||
"""Represents I Coordinate node.""" | ||
|
||
def visit(self, visitor: AstVisitor) -> CoordinateI: | ||
"""Handle visitor call.""" | ||
return visitor.on_coordinate_i(self) | ||
|
||
def get_visitor_callback_function( | ||
self, visitor: AstVisitor | ||
) -> Callable[[Self], CoordinateI]: | ||
"""Get callback function for the node.""" | ||
return visitor.on_coordinate_i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""`pygerber.nodes.other.CoordinateJ` module contains definition of `CoordinateJ` | ||
class which represent Jxx...x packed coordinates. | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
from typing import TYPE_CHECKING, Callable | ||
|
||
from pygerber.gerber.ast.nodes.other.coordinate import Coordinate | ||
|
||
if TYPE_CHECKING: | ||
from typing_extensions import Self | ||
|
||
from pygerber.gerber.ast.ast_visitor import AstVisitor | ||
|
||
|
||
class CoordinateJ(Coordinate): | ||
"""Represents J Coordinate node.""" | ||
|
||
def visit(self, visitor: AstVisitor) -> CoordinateJ: | ||
"""Handle visitor call.""" | ||
return visitor.on_coordinate_j(self) | ||
|
||
def get_visitor_callback_function( | ||
self, visitor: AstVisitor | ||
) -> Callable[[Self], CoordinateJ]: | ||
"""Get callback function for the node.""" | ||
return visitor.on_coordinate_j |
Oops, something went wrong.