apel/db/__init__.py

Summary

Maintainability
A
0 mins
Test Coverage

Module level import not at top of file
Open

from apel.db.apeldb import ApelDb, Query, ApelDbException
Severity: Minor
Found in apel/db/__init__.py by pep8

Place imports at the top of the file.

Always put imports at the top of the file, just after any module
comments and docstrings, and before module globals and constants.

Okay: import os
Okay: # this is a comment\nimport os
Okay: '''this is a module docstring'''\nimport os
Okay: r'''this is a module docstring'''\nimport os
Okay:
try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
Okay:
try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
E402: a=1\nimport os
E402: 'One string'\n"Two string"\nimport os
E402: a=1\nfrom sys import x

Okay: if x:\n    import os

Import from apel.db.apeldb import ApelDb, Query, ApelDbException should be placed at the top of the module
Open

from apel.db.apeldb import ApelDb, Query, ApelDbException
Severity: Info
Found in apel/db/__init__.py by pylint

Used when code and imports are mixed

There are no issues that match your filters.

Category
Status