-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Pylint warning unused-import #4518
base: develop
Are you sure you want to change the base?
Changes from all commits
9d285ef
7c7cd98
48d7386
76c50fe
14a2a23
4cbe32c
3703d3a
c809024
e28a2a9
a76213f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,7 +117,6 @@ | |
.. autoexception:: ApplicationError | ||
|
||
""" | ||
import glob | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing |
||
import os | ||
import errno | ||
import shutil | ||
|
@@ -131,8 +130,8 @@ | |
import numpy as np | ||
import matplotlib.pyplot as plt | ||
|
||
from MDAnalysis import ApplicationError | ||
from MDAnalysis.lib.util import which, realpath, asiterable, deprecate | ||
from MDAnalysis import ApplicationError # pylint: disable=unused-import # module will be removed in 3.0.0 | ||
from MDAnalysis.lib.util import which, realpath, asiterable, deprecate # pylint: disable=unused-import | ||
|
||
import logging | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ | |
import numpy as np | ||
|
||
from . import base | ||
from . import core | ||
from ..lib.mdamath import triclinic_box | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we like using Personally, I generally prefer non-local objects to have at least one level of provenance attached to their name but I won't block over choosing the bare import. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unless there are other reviewers that want to change to from ..lib import mdamath
...
mdamath.triclinic_box(...) leave it as is, at least it's consistently used throughout. |
||
from ..lib import util | ||
from ..lib.util import cached, store_init_arguments | ||
|
||
|
@@ -123,7 +123,7 @@ def _read_first_frame(self): | |
if has_forces: | ||
ts._forces = forces | ||
if not imcon == 0: | ||
ts.dimensions = core.triclinic_box(*unitcell) | ||
ts.dimensions = triclinic_box(*unitcell) | ||
|
||
ts.frame = 0 | ||
|
||
|
@@ -176,7 +176,7 @@ def _read_next_timestep(self, ts=None): | |
unitcell[0] = self._file.readline().split() | ||
unitcell[1] = self._file.readline().split() | ||
unitcell[2] = self._file.readline().split() | ||
ts.dimensions = core.triclinic_box(*unitcell) | ||
ts.dimensions = triclinic_box(*unitcell) | ||
|
||
# If ids are given, put them in here | ||
# and later sort by them | ||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -210,10 +210,11 @@ | |||||||||
|
||||||||||
import numpy as np | ||||||||||
import MDAnalysis as mda | ||||||||||
from . import base, core | ||||||||||
from . import base | ||||||||||
from ..exceptions import NoDataError | ||||||||||
from ..due import due, Doi | ||||||||||
from MDAnalysis.lib.util import store_init_arguments | ||||||||||
from MDAnalysis.lib.mdamath import triclinic_box | ||||||||||
Comment on lines
216
to
+217
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we change these to relative imports like everything else?
Suggested change
|
||||||||||
try: | ||||||||||
import h5py | ||||||||||
except ImportError: | ||||||||||
|
@@ -652,7 +653,7 @@ def _read_frame(self, frame): | |||||||||
if edges.shape == (3,): | ||||||||||
ts.dimensions = [*edges, 90, 90, 90] | ||||||||||
else: | ||||||||||
ts.dimensions = core.triclinic_box(*edges) | ||||||||||
ts.dimensions = triclinic_box(*edges) | ||||||||||
else: | ||||||||||
ts.dimensions = None | ||||||||||
|
||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,6 @@ | |
# J. Comput. Chem. 32 (2011), 2319--2327, doi:10.1002/jcc.21787 | ||
# | ||
import warnings | ||
from ..converters.ParmEd import (ParmEdConverter, ParmEdReader, | ||
get_indices_from_subset, MDA2PMD,) | ||
Comment on lines
-24
to
-25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These MUST stay for compatibility reasons. The module will be removed in 3.0.0. Just mark them to be ignored by the linter. |
||
|
||
|
||
warnings.warn( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have no tests for this module - I would suggest not touching imports here