Skip to content

Commit

Permalink
Use PEP8-compliant Modeller class if available
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Jul 25, 2020
1 parent dde981f commit a9807fb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion doc/mockpy/modeller/util/modobject.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
class modobject(object):
class ModObject(object):
pass
9 changes: 6 additions & 3 deletions pyext/mdt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
'write_improperlib', 'write_splinelib', 'uniform_bins',
'write_statpot']

from modeller.util.modobject import modobject
try:
from modeller.util.modobject import ModObject
except ImportError:
from modeller.util.modobject import modobject as ModObject
from modeller.util import modlist
# Import _modeller after modeller itself, since the latter modifies the search
# path for the former:
Expand Down Expand Up @@ -77,7 +80,7 @@ def __init__(self, bin_type):
#: 8-bit unsigned integer bin storage (range 0 to 255)
UnsignedInt8 = _BinType(_mdt.MOD_MDTB_UINT8)

class Library(modobject):
class Library(ModObject):
"""
Library data used in the construction and use of MDTs.
Expand Down Expand Up @@ -231,7 +234,7 @@ def read(self, filename):
return _mdt.mdt_hbond_read(filename, self._mlib._modpt)


class TableSection(modobject):
class TableSection(ModObject):
"""A section of a multi-dimensional table. You should not create
TableSection objects directly, but rather by indexing a :class:`Table`
object, as a TableSection is just a 'view' into an existing table.
Expand Down
6 changes: 3 additions & 3 deletions tools/w32/python-search-path.patch
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
+_add_pyext_to_path()
+
+
from modeller.util.modobject import modobject
from modeller.util import modlist
# Import _modeller after modeller itself, since the latter modifies the search
try:
from modeller.util.modobject import ModObject
except ImportError:

0 comments on commit a9807fb

Please sign in to comment.