Skip to content

Commit

Permalink
fix typing for Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
MAKOMO committed Oct 18, 2024
1 parent e464755 commit 2f7e92e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/artisanlib/acaia.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class AcaiaBLE(ClientBLE):
ACAIA_PEARL_NAME:Final[str] = 'PEARL-' # Acaia Pearl (2021)
ACAIA_PEARLS_NAME:Final[str] = 'PEARLS' # Acaia Pearl S
ACAIA_LUNAR_NAME:Final[str] = 'LUNAR-' # Acaia Lunar (2021)
ACAIA_CINCO_NAME:Final[str] = 'CINCO' # Acaia Cinco
ACAIA_PYXIS_NAME:Final[str] = 'PYXIS' # Acaia Pyxis

# Acaia message constants
Expand Down Expand Up @@ -156,7 +157,7 @@ def __init__(self) -> None:
self.add_write(self.ACAIA_LEGACY_SERVICE_UUID, self.ACAIA_LEGACY_WRITE_UUID)

# register Acaia Current UUIDs
for acaia_name in (self.ACAIA_PEARL_NAME, self.ACAIA_PEARLS_NAME, self.ACAIA_LUNAR_NAME, self.ACAIA_PYXIS_NAME):
for acaia_name in (self.ACAIA_PEARL_NAME, self.ACAIA_PEARLS_NAME, self.ACAIA_LUNAR_NAME, self.ACAIA_PYXIS_NAME, self.ACAIA_CINCO_NAME):
self.add_device_description(self.ACAIA_SERVICE_UUID, acaia_name)
self.add_notify(self.ACAIA_NOTIFY_UUID, self.notify_callback)
self.add_write(self.ACAIA_SERVICE_UUID, self.ACAIA_WRITE_UUID)
Expand Down
2 changes: 1 addition & 1 deletion src/artisanlib/async_comm.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def loop(self) -> asyncio.AbstractEventLoop:

class AsyncIterable:

_queue: asyncio.Queue[bytes]
_queue: 'asyncio.Queue[bytes]' # type Queue is not subscriptable in Python <3.9 thus it is quoted

def __init__(self, queue:asyncio.Queue[bytes]) -> None:
self._queue = queue
Expand Down
36 changes: 36 additions & 0 deletions src/includes/Machines/Garanti/GKPX.aset
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ baudrate=9600
bytesize=8
comport=COM5
host=127.0.0.1
input10BCDsAsInt=false
input10FloatsAsInt=false
input10Signed=false
input10bcd=false
input10code=3
input10div=0
input10float=false
input10mode=C
input10register=0
input10slave=0
input1BCDsAsInt=false
input1Signed=false
input1bcd=false
input1code=3
input1div=1
Expand All @@ -27,6 +39,8 @@ input1FloatsAsInt=false
input1mode=C
input1register=4096
input1slave=1
input2BCDsAsInt=false
input2Signed=false
input2bcd=false
input2code=3
input2div=1
Expand All @@ -35,6 +49,8 @@ input2FloatsAsInt=false
input2mode=C
input2register=4096
input2slave=2
input3BCDsAsInt=false
input3Signed=false
input3bcd=false
input3code=3
input3div=0
Expand All @@ -43,6 +59,8 @@ input3FloatsAsInt=false
input3mode=C
input3register=0
input3slave=0
input4BCDsAsInt=false
input4Signed=false
input4bcd=false
input4code=3
input4div=0
Expand All @@ -51,6 +69,8 @@ input4FloatsAsInt=false
input4mode=C
input4register=0
input4slave=0
input5BCDsAsInt=false
input5Signed=false
input5bcd=false
input5code=3
input5div=0
Expand All @@ -59,6 +79,8 @@ input5FloatsAsInt=false
input5mode=C
input5register=0
input5slave=0
input6BCDsAsInt=false
input6Signed=false
input6bcd=false
input6code=3
input6div=0
Expand All @@ -67,6 +89,8 @@ input6FloatsAsInt=false
input6mode=C
input6register=0
input6slave=0
input7BCDsAsInt=false
input7Signed=false
input7bcd=false
input7code=3
input7div=0
Expand All @@ -75,6 +99,8 @@ input7FloatsAsInt=false
input7mode=C
input7register=0
input7slave=0
input8BCDsAsInt=false
input8Signed=false
input8bcd=false
input8code=3
input8div=0
Expand All @@ -83,6 +109,16 @@ input8FloatsAsInt=false
input8mode=C
input8register=0
input8slave=0
input9BCDsAsInt=false
input9FloatsAsInt=false
input9Signed=false
input9bcd=false
input9code=3
input9div=0
input9float=false
input9mode=C
input9register=0
input9slave=0
littleEndianFloats=false
parity=N
port=502
Expand Down

0 comments on commit 2f7e92e

Please sign in to comment.