PY3.R0401
Cyclic import
Used when a cyclic import between two or more modules is detected.
Noncompliant Code:
Copy
cat > a.py <<EOF
import b
EOF
cat > b.py <<EOF
import a
EOF
Compliant Code:
Copy
cat > intermediate.py <<EOF
import a
import b
# do some actions with `a` and `b` modules
EOF
cat > a.py <<EOF
# do some action
EOF
cat > b.py <<EOF
# do some action
EOF