Skip to content

Commit 6f6acc2

Browse files
committed
Fix issue with none
1 parent b3952e7 commit 6f6acc2

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

.github/workflows/validate.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,5 @@ jobs:
2424
run: isort ./ --check
2525
- name: Run black
2626
run: black ./ --check
27-
- name: Run pyright
28-
run: pyright
2927
- name: Run test install
30-
run: pip install .
28+
run: pip install .

e3dc/_e3dc_rscp_local.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class E3DC_RSCP_local:
4545
"""A class describing an E3DC system connection using RSCP protocol locally."""
4646

4747
def __init__(
48-
self, username: str, password: str, ip: str, key: str, port: int = PORT
48+
self, username: str, password: str, ip: str, key: str, port: int | None = PORT
4949
):
5050
"""Constructor of an E3DC RSCP local object.
5151
@@ -59,7 +59,7 @@ def __init__(
5959
self.username = username.encode("utf-8")
6060
self.password = password.encode("utf-8")
6161
self.ip = ip
62-
self.port = port
62+
self.port = port if port else PORT
6363
self.key = key.encode("utf-8")
6464
self.socket: socket.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
6565
self.connected: bool = False

0 commit comments

Comments
 (0)