gijzelaerr / python-snap7

A Python wrapper for the snap7 PLC communication library
http://python-snap7.readthedocs.org/
MIT License
643 stars 246 forks source link

DB usability improvements #385

Closed vmsh0 closed 1 year ago

vmsh0 commented 2 years ago

In reference to Issues #379 and #380, I'm opening this PR with proposed improvements for the DB class.

Please let me know whether there's anything I can change/improve to get this pulled.

vmsh0 commented 2 years ago

As you can see, I also added some static typing fixes that seemed appropriate. Existing code, as well as some of my new code, failed static typechecks without those fixes.

In particular, None values for some of the numeric parameters of DB where accepted for some of the instance attributes. This doesn't make sense as: