Move some harmless imports to file scope. NFC.

This commit is contained in:
Arthur O'Dwyer
2017-04-17 23:00:36 -07:00
parent 30f8c623e5
commit 12283b0836
3 changed files with 5 additions and 8 deletions

View File

@ -1,6 +1,9 @@
import logging
import formulas
from bond import Bond
from correspondence import Correspondence
from letter import Letter
from workspaceString import WorkspaceString
@ -119,8 +122,6 @@ class Workspace(object):
def numberOfUnreplacedObjects(self):
"""A list of all unreplaced objects in the inital string"""
from letter import Letter
objects = [o for o in self.objects
if o.string == self.initial and isinstance(o, Letter)]
objects = [o for o in objects if not o.replacement]
@ -135,13 +136,9 @@ class Workspace(object):
def numberOfBonds(self):
"""The number of bonds in the workspace"""
from bond import Bond
return len([o for o in self.structures if isinstance(o, Bond)])
def correspondences(self):
from correspondence import Correspondence
return [s for s in self.structures if isinstance(s, Correspondence)]
def slippages(self):