Skip to content

Commit b6d9bce

Browse files
committed
Added check for relative package imports
1 parent 70e4e70 commit b6d9bce

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

stumpy/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3689,7 +3689,7 @@ def check_ignore_trivial(T_A, T_B, ignore_trivial):
36893689
36903690
Notes
36913691
-----
3692-
These warnings may be supresse by using a context manager
3692+
These warnings may be supressed by using a context manager
36933693
```
36943694
import stumpy
36953695
import numpy as np

test.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,16 @@ check_fastmath()
100100
check_errs $?
101101
}
102102

103+
check_pkg_imports()
104+
{
105+
echo "Checking Package Imports"
106+
if [[ `grep '^from stumpy' stumpy/*py | wc -l` -gt "0" ]]; then
107+
grep '^from stumpy' stumpy/*py
108+
echo 'Error: please change "from stumpy" to "from ." '
109+
exit 1
110+
fi
111+
}
112+
103113
check_naive()
104114
{
105115
# Check if there are any naive implementations not at start of test file
@@ -337,6 +347,7 @@ check_isort
337347
check_flake
338348
check_docstrings
339349
check_print
350+
check_pkg_imports
340351
check_naive
341352
check_ray
342353

0 commit comments

Comments
 (0)