Move some harmless imports to file scope. NFC.
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
from conceptMapping import ConceptMapping
|
from conceptMapping import ConceptMapping
|
||||||
|
from group import Group
|
||||||
from letter import Letter
|
from letter import Letter
|
||||||
from workspaceStructure import WorkspaceStructure
|
from workspaceStructure import WorkspaceStructure
|
||||||
import formulas
|
import formulas
|
||||||
@ -176,7 +177,6 @@ class Correspondence(WorkspaceStructure):
|
|||||||
for mapping in relevantMappings:
|
for mapping in relevantMappings:
|
||||||
if mapping.slippage():
|
if mapping.slippage():
|
||||||
self.accessoryConceptMappings += [mapping.symmetricVersion()]
|
self.accessoryConceptMappings += [mapping.symmetricVersion()]
|
||||||
from group import Group
|
|
||||||
if isinstance(self.objectFromInitial, Group):
|
if isinstance(self.objectFromInitial, Group):
|
||||||
if isinstance(self.objectFromTarget, Group):
|
if isinstance(self.objectFromTarget, Group):
|
||||||
bondMappings = formulas.getMappings(
|
bondMappings = formulas.getMappings(
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from description import Description
|
||||||
from workspaceObject import WorkspaceObject
|
from workspaceObject import WorkspaceObject
|
||||||
import formulas
|
import formulas
|
||||||
|
|
||||||
@ -40,7 +41,6 @@ class Group(WorkspaceObject):
|
|||||||
self.clampSalience = False
|
self.clampSalience = False
|
||||||
self.name = ''
|
self.name = ''
|
||||||
|
|
||||||
from description import Description # gross
|
|
||||||
if self.bondList and len(self.bondList):
|
if self.bondList and len(self.bondList):
|
||||||
firstFacet = self.bondList[0].facet
|
firstFacet = self.bondList[0].facet
|
||||||
self.addBondDescription(
|
self.addBondDescription(
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
import formulas
|
import formulas
|
||||||
|
from bond import Bond
|
||||||
|
from correspondence import Correspondence
|
||||||
|
from letter import Letter
|
||||||
from workspaceString import WorkspaceString
|
from workspaceString import WorkspaceString
|
||||||
|
|
||||||
|
|
||||||
@ -119,8 +122,6 @@ class Workspace(object):
|
|||||||
|
|
||||||
def numberOfUnreplacedObjects(self):
|
def numberOfUnreplacedObjects(self):
|
||||||
"""A list of all unreplaced objects in the inital string"""
|
"""A list of all unreplaced objects in the inital string"""
|
||||||
from letter import Letter
|
|
||||||
|
|
||||||
objects = [o for o in self.objects
|
objects = [o for o in self.objects
|
||||||
if o.string == self.initial and isinstance(o, Letter)]
|
if o.string == self.initial and isinstance(o, Letter)]
|
||||||
objects = [o for o in objects if not o.replacement]
|
objects = [o for o in objects if not o.replacement]
|
||||||
@ -135,13 +136,9 @@ class Workspace(object):
|
|||||||
|
|
||||||
def numberOfBonds(self):
|
def numberOfBonds(self):
|
||||||
"""The number of bonds in the workspace"""
|
"""The number of bonds in the workspace"""
|
||||||
from bond import Bond
|
|
||||||
|
|
||||||
return len([o for o in self.structures if isinstance(o, Bond)])
|
return len([o for o in self.structures if isinstance(o, Bond)])
|
||||||
|
|
||||||
def correspondences(self):
|
def correspondences(self):
|
||||||
from correspondence import Correspondence
|
|
||||||
|
|
||||||
return [s for s in self.structures if isinstance(s, Correspondence)]
|
return [s for s in self.structures if isinstance(s, Correspondence)]
|
||||||
|
|
||||||
def slippages(self):
|
def slippages(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user