Move some harmless imports to file scope. NFC.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
from conceptMapping import ConceptMapping
|
||||
from group import Group
|
||||
from letter import Letter
|
||||
from workspaceStructure import WorkspaceStructure
|
||||
import formulas
|
||||
@ -176,7 +177,6 @@ class Correspondence(WorkspaceStructure):
|
||||
for mapping in relevantMappings:
|
||||
if mapping.slippage():
|
||||
self.accessoryConceptMappings += [mapping.symmetricVersion()]
|
||||
from group import Group
|
||||
if isinstance(self.objectFromInitial, Group):
|
||||
if isinstance(self.objectFromTarget, Group):
|
||||
bondMappings = formulas.getMappings(
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import logging
|
||||
|
||||
from description import Description
|
||||
from workspaceObject import WorkspaceObject
|
||||
import formulas
|
||||
|
||||
@ -40,7 +41,6 @@ class Group(WorkspaceObject):
|
||||
self.clampSalience = False
|
||||
self.name = ''
|
||||
|
||||
from description import Description # gross
|
||||
if self.bondList and len(self.bondList):
|
||||
firstFacet = self.bondList[0].facet
|
||||
self.addBondDescription(
|
||||
|
||||
@ -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):
|
||||
|
||||
Reference in New Issue
Block a user