Skip to content

Commit eb91579

Browse files
akvadrakoxairy
authored andcommitted
backend: clean up FacedancerBackend __init__ argument types
The device argument corresponds to the backend device that should be used when emulating USB devices, not to the device being emulated. Thus, drop the USBDevice annotation. Co-developed-by: Andrey Konovalov <andreyknvl@gmail.com>
1 parent 8ed8249 commit eb91579

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

facedancer/backends/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44

55
class FacedancerBackend:
6-
def __init__(self, device: USBDevice=None, verbose: int=0, quirks: List[str]=[]):
6+
def __init__(self, device=None, verbose: int=0, quirks: List[str]=[]):
77
"""
88
Initializes the backend.
99
1010
Args:
11-
device : The device that will act as our Facedancer. (Optional)
11+
device : The device that will act as our Facedancer. (Optional)
1212
verbose : The verbosity level of the given application. (Optional)
13-
quirks : List of USB platform quirks. (Optional)
13+
quirks : List of USB platform quirks. (Optional)
1414
"""
1515
raise NotImplementedError
1616

facedancer/backends/hydradancer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ class HydradancerHostApp(FacedancerApp, FacedancerBackend):
5757

5858
current_setup_req = None
5959

60-
def __init__(self, device: USBDevice=None, verbose: int=0, quirks: List[str]=[]):
60+
def __init__(self, device=None, verbose: int=0, quirks: List[str]=[]):
6161
"""
6262
Initializes the backend.
6363
6464
Args:
65-
device : The device that will act as our Facedancer. (Optional)
65+
device : The device that will act as our Facedancer. (Optional)
6666
verbose : The verbosity level of the given application. (Optional)
67-
quirks : List of USB platform quirks. (Optional)
67+
quirks : List of USB platform quirks. (Optional)
6868
"""
6969
super().__init__(self)
7070

facedancer/backends/moondancer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class MoondancerApp(FacedancerApp, FacedancerBackend):
8484
# Number of supported USB endpoints.
8585
SUPPORTED_ENDPOINTS = 16
8686

87-
def __init__(self, device: USBDevice=None, verbose: int=0, quirks: List[str]=[]):
87+
def __init__(self, device=None, verbose: int=0, quirks: List[str]=[]):
8888
"""
8989
Sets up a new Cynthion-backed Facedancer (Moondancer) application.
9090

0 commit comments

Comments
 (0)