pylint-errors

E0611 (no-name-in-module)

:x: Problematic code:

cat > package/__init__.py <<EOF
class AudioTime:
    DECIMAL = 3
EOF

cat > package/AudioTime.py <<EOF
class AudioTime:
    pass


cat > test.py <<EOF
from package import AudioTime
print(AudioTime.DECIMAL)
EOF

:heavy_check_mark: Correct code:

cat > package/__init__.py <<EOF
class AudioTime:
    DECIMAL = 3
EOF

cat > test.py <<EOF
from package import AudioTime
print(AudioTime.DECIMAL)
EOF

Rationale:

Used when a name cannot be found in a module.