clr.AddReference('Kingdee.BOS')clr.AddReference('Kingdee.BOS.Core')fromKingdee.BOSimport*fromKingdee.BOS.Coreimport*defOnAddValidators(e):vdts=e.Validators;vdt=list(filter(lambdax:x.__class__.__name__=='BillNoValidatator',vdts));if(len(vdt)>0):forvinvdt:e.Validtors.Remove(v);报错expectedanindentedblock在Microsoft.Scripting.Hosting.ErrorListenerProxySink.Add(SourceUnitsourceUnit,Stringmessage,SourceSpanspan,Int32errorCode,Severityseverity)在IronPython.Compiler.Parser.ReportSyntaxError(Int32start,Int32end,Stringmessage,Int32errorCode)在IronPython.Compiler.Parser.ReportSyntaxError(Tokent,IndexSpanspan,Int32errorCode,BooleanallowIncomplete)在IronPython.Compiler.Parser.ReportSyntaxError(TokenWithSpant,Int32errorCode)在IronPython.Compiler.Parser.ParseSuite()在IronPython.Compiler.Parser.ParseClassOrFuncBody()在IronPython.Compiler.Parser.ParseFuncDef()在IronPython.Compiler.Parser.ParseFileWorker(BooleanmakeModule,BooleanreturnValue)在IronPython.Compiler.Parser.ParseFile(BooleanmakeModule,BooleanreturnValue)在IronPython.Runtime.PythonContext.ParseAndBindAst(CompilerContextcontext)在IronPython.Runtime.PythonContext.CompilePythonCode(SourceUnitsourceUnit,CompilerOptionsoptions,ErrorSinkerrorSink)在IronPython.Runtime.PythonContext.CompileSourceCode(SourceUnitsourceUnit,CompilerOptionsoptions,ErrorSinkerrorSink)在Microsoft.Scripting.Hosting.ScriptSource.CompileInternal(CompilerOptionscompilerOptions,ErrorListenererrorListener)在Kingdee.BOS.DomainModelDesigner.PropertyEditor.frmPythonScriptEdit.GenerateCompiledPython()在Kingdee.BOS.DomainModelDesigner.PropertyEditor.frmPythonScriptEdit.InitializeScope()在Kingdee.BOS.DomainModelDesigner.PropertyEditor.frmPythonScriptEdit.ButtonItem_Click(Objectsender,EventArgse)