Skip to content

Commit

Permalink
- removes s7client
Browse files Browse the repository at this point in the history
- updates libs
  • Loading branch information
MAKOMO committed Sep 14, 2023
1 parent 68f27ab commit 8e157f4
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
5 changes: 2 additions & 3 deletions src/artisanlib/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -11889,6 +11889,7 @@ def toggleMonitorTigger(self):
#Turns ON/OFF flag self.flagon to read and print values. Called from push buttonONOFF.
@pyqtSlot(bool)
def ToggleMonitor(self,_=False):
_log.debug('ToggleMonitor')
#turn ON
if not self.flagon:
# QApplication.processEvents()
Expand Down Expand Up @@ -16812,9 +16813,7 @@ def run(self):
self.sample()
finally:
self.aw.qmc.flagsampling = False # we signal that we are done with sampling
else:
self.quit()
break #thread ends
# else: we don't self.quit() and break to end the thread as the simulator (paused) might still be running
else:
self.aw.qmc.flagsampling = False # type: ignore # mypy: Statement is unreachable [unreachable] # we signal that we are done with sampling
# port is disconnected in OFFmonitor by calling disconnectProbes() => disconnectProbesFromSerialDevice()
Expand Down
2 changes: 1 addition & 1 deletion src/artisanlib/s7client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ def __init__(self) -> None:
super().__init__()

# avoiding an exception on __del__ as self.library might not yet be set if loading of shared lib failed!
def destroy(self):
def destroy(self) -> None:
if hasattr(self, 'library'):
super().destroy()
4 changes: 2 additions & 2 deletions src/artisanlib/s7port.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
import struct
import logging
from typing import List, Dict, Tuple, Optional, Iterator, TYPE_CHECKING
from typing_extensions import Final # Python <=3.7
from typing import Final # Python <=3.7

if TYPE_CHECKING:
from artisanlib.s7client import S7Client # noqa: F401 # pylint: disable=unused-import
from snap7.client import Client as S7Client
from snap7.types import Areas # noqa: F401 # pylint: disable=unused-import
from artisanlib.main import ApplicationWindow # noqa: F401 # pylint: disable=unused-import

Expand Down
4 changes: 2 additions & 2 deletions src/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
types-openpyxl==3.1.0.17
types-openpyxl==3.1.0.19
types-protobuf==4.24.0.1
types-psutil==5.9.5.16
types-pyserial==3.5.0.10
Expand All @@ -21,6 +21,6 @@ pytest-qt==4.2.0
#pytest-bdd==6.1.1
#pytest-benchmark==4.0.0
#pytest-mock==3.11.1
hypothesis==6.84.2
hypothesis==6.84.3
coverage==7.3.1
coverage-badge==1.1.0
10 changes: 5 additions & 5 deletions src/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Pillow==9.5.0; sys_platform=='darwin'
######
# packages that are required on all platforms
#
setuptools==68.2.0
setuptools==68.2.2
wheel==0.41.2
pyserial==3.5
pymodbus==3.5.2
Expand All @@ -42,7 +42,7 @@ pyusb==1.2.1
persist-queue==0.8.1
portalocker==2.6.0
xlrd==2.0.1
websocket-client==1.6.1
websocket-client==1.6.3
websockets==11.0.3
PyYAML==6.0.1
psutil==5.9.4
Expand All @@ -56,16 +56,16 @@ wquantiles==0.6
colorspacious==1.1.2
openpyxl==3.1.2
keyring==24.2.0
prettytable==3.8.0
prettytable==3.9.0
lxml==4.9.3
matplotlib==3.7.2
matplotlib==3.7.3
#
#
######
# packages that differ per platform
#
## install gevent only on macOS higher than 10.13 to deactivate WebLCDs on macOS legacy builds
gevent==23.9.0.post1; sys_platform!='darwin' or platform_release>='18.0' # WebLCDs not supported on macOS 10.13
gevent==23.9.1; sys_platform!='darwin' or platform_release>='18.0' # WebLCDs not supported on macOS 10.13
gevent-websocket==0.10.1; sys_platform!='darwin' or platform_release>='18.0' # WebLCDs not supported on macOS 10.13
##
### yoctopuce 1.10.42060 on macOS 10.13
Expand Down

0 comments on commit 8e157f4

Please sign in to comment.