Skip to content

Commit 31604ee

Browse files
Jasper Smitjrhrsmit
Jasper Smit
authored andcommitted
Lib: Picker: JLPCB: Move pickers, add can_query trait
Add can_query_jlcpcb_db trait Move pickers from libs/picker/jlcpcb.py to libs/picker/jlcpcb/pickers.py Move remaining jlcpcb.py to libs.picker/jlcpcb/jlcpcb.py Update test
1 parent 9940bd6 commit 31604ee

File tree

6 files changed

+527
-462
lines changed

6 files changed

+527
-462
lines changed
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file is part of the faebryk project
2+
# SPDX-License-Identifier: MIT
3+
4+
from abc import abstractmethod
5+
from typing import Callable
6+
7+
from faebryk.core.core import Module, ModuleTrait
8+
9+
10+
class can_query_jlcpcb_db(ModuleTrait):
11+
@abstractmethod
12+
def get_picker(self) -> Callable[[Module, int], None]: ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file is part of the faebryk project
2+
# SPDX-License-Identifier: MIT
3+
4+
from typing import Callable
5+
6+
from faebryk.core.core import Module
7+
from faebryk.library.can_query_jlcpcb_db import can_query_jlcpcb_db
8+
9+
10+
class can_query_jlcpcb_db_defined(can_query_jlcpcb_db.impl()):
11+
def __init__(self, query_fn: Callable[[Module, int], None]):
12+
super().__init__()
13+
self.query_fn = query_fn
14+
15+
def get_picker(self) -> Callable[[Module, int], None]:
16+
return self.query_fn

0 commit comments

Comments
 (0)