Skip to content

Commit

Permalink
Fix pylint and mypy checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusgreuel committed Dec 4, 2023
1 parent 2921b96 commit 754930c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ disable = [
"no-else-return",
"duplicate-code",
"cyclic-import",
"redefined-builtin",
]

[[tool.mypy.overrides]]
Expand Down
2 changes: 0 additions & 2 deletions src/dwfpy/analog_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,6 @@ def get_noise(self, first_sample: int = 0, sample_count: int = -1):
)
return np.array((min_samples, max_samples)).T

# pylint: disable-next=redefined-builtin
def setup(
self,
range: Optional[float] = None,
Expand Down Expand Up @@ -816,7 +815,6 @@ def wait_for_status(self, status, read_data: bool = False) -> None:
while self.read_status(read_data=read_data) != status:
time.sleep(0.001)

# pylint: disable-next=redefined-builtin
def setup_channel(
self,
channel: int,
Expand Down
4 changes: 2 additions & 2 deletions src/dwfpy/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def current_limit(self, value: bool) -> None:
self._device.analog_io[1][2].value = value

def setup(
self, voltage: float, current_limit: float = None, enabled: bool = True
self, voltage: float, current_limit: Optional[float] = None, enabled: bool = True
) -> None:
"""Sets up the positive power supply.
Expand Down Expand Up @@ -541,7 +541,7 @@ def current_limit(self, value: bool) -> None:
self._device.analog_io[2][2].value = value

def setup(
self, voltage: float, current_limit: float = None, enabled: bool = True
self, voltage: float, current_limit: Optional[float] = None, enabled: bool = True
) -> None:
"""Sets up the negative power supply.
Expand Down
12 changes: 6 additions & 6 deletions src/dwfpy/protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ def setup_three_wire(
self,
pin_clock: int,
pin_siso: int,
pin_select: int = None,
frequency: float = None,
pin_select: Optional[int] = None,
frequency: Optional[float] = None,
mode: int = 0,
msb_first: bool = True,
) -> None:
Expand All @@ -331,8 +331,8 @@ def setup_dual(
pin_clock: int,
pin_dq0: int,
pin_dq1: int,
pin_select: int = None,
frequency: float = None,
pin_select: Optional[int] = None,
frequency: Optional[float] = None,
mode: int = 0,
msb_first: bool = True,
) -> None:
Expand All @@ -354,8 +354,8 @@ def setup_quad(
pin_dq1: int,
pin_dq2: int,
pin_dq3: int,
pin_select: int = None,
frequency: float = None,
pin_select: Optional[int] = None,
frequency: Optional[float] = None,
mode: int = 0,
msb_first: bool = True,
) -> None:
Expand Down

0 comments on commit 754930c

Please sign in to comment.