m-lundberg / simple-pid

A simple and easy to use PID controller in Python
MIT License
767 stars 209 forks source link

mypy error simple_pid/PID.pyi:45: error: Name "output_limits" already defined on line 17 #50

Closed rnestler closed 2 years ago

rnestler commented 2 years ago

It seems that output_limits is defined twice: Once on line 17 and then again on line 45 and 46.

rnestler commented 2 years ago

It would probably be good to run mypy --strict simple_pid during CI to avoid issues like this. Also since Python 2 is EOL you could consider removing Python 2 support and use inline type annotations, which are easier to manage.

m-lundberg commented 2 years ago

You are right, mypy should be run in CI to detect things like this. I will create an issue for this.