Skip to content

Commit

Permalink
Rename module from PID to pid
Browse files Browse the repository at this point in the history
This avoids shadowing the module with the re-export of the PID class.
Fixes #53.
  • Loading branch information
rnestler authored and m-lundberg committed Apr 28, 2022
1 parent 51f0577 commit 6bdc413
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion simple_pid/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from simple_pid.PID import PID as PID
from simple_pid.pid import PID as PID
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions tests/test_pid.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_sample_time():


def test_monotonic():
from simple_pid.PID import _current_time
from simple_pid.pid import _current_time

if sys.version_info < (3, 3):
assert _current_time == time.time
Expand All @@ -134,7 +134,7 @@ def test_auto_mode():
assert pid(8) == 2

# Last update time should be reset to avoid huge dt
from simple_pid.PID import _current_time
from simple_pid.pid import _current_time

pid.auto_mode = False
time.sleep(1)
Expand All @@ -159,7 +159,7 @@ def test_separate_components():


def test_clamp():
from simple_pid.PID import _clamp
from simple_pid.pid import _clamp

assert _clamp(None, (None, None)) is None
assert _clamp(None, (-10, 10)) is None
Expand Down

0 comments on commit 6bdc413

Please sign in to comment.