88using System . Runtime . CompilerServices ;
99using System . Text ;
1010
11- using Microsoft . Scripting ;
12- using Microsoft . Scripting . Runtime ;
13-
1411using IronPython . Runtime . Operations ;
1512
16- [ module : System . Diagnostics . CodeAnalysis . SuppressMessage ( " Microsoft.Naming" , "CA1704:IdentifiersShouldBeSpelledCorrectly" , Scope = "member" , Target = "IronPython.Runtime.Exceptions.TraceBackFrame..ctor(System.Object,System.Object,System.Object)" , MessageId = "0#globals" ) ]
17- [ module : System . Diagnostics . CodeAnalysis . SuppressMessage ( " Microsoft.Naming" , "CA1704:IdentifiersShouldBeSpelledCorrectly" , Scope = "member" , Target = "IronPython .Runtime.Exceptions.TraceBackFrame.Globals" , MessageId = "Globals" ) ]
13+ using Microsoft . Scripting ;
14+ using Microsoft . Scripting . Runtime ;
1815
1916namespace IronPython . Runtime . Exceptions {
2017 [ PythonType ( "traceback" ) ]
2118 [ Serializable ]
22- public class TraceBack {
19+ public sealed class TraceBack {
2320 private readonly TraceBack _next ;
2421 private readonly TraceBackFrame _frame ;
2522 private int _line ;
@@ -79,7 +76,7 @@ internal string Extract() {
7976 [ PythonType ( "frame" ) ]
8077 [ DebuggerDisplay ( "Code = {f_code.co_name}, Line = {f_lineno}" ) ]
8178 [ Serializable ]
82- public class TraceBackFrame {
79+ public sealed class TraceBackFrame {
8380 private readonly PythonTracebackListener _traceAdapter ;
8481 private TracebackDelegate _trace ;
8582 private object _traceObject ;
@@ -118,11 +115,11 @@ internal TraceBackFrame(PythonTracebackListener traceAdapter, FunctionCode code,
118115
119116 [ SpecialName , PropertyMethod ]
120117 public object Getf_trace ( ) {
121- if ( _traceAdapter != null ) {
122- return _traceObject ;
123- } else {
124- return null ;
125- }
118+ if ( _traceAdapter != null ) {
119+ return _traceObject ;
120+ } else {
121+ return null ;
122+ }
126123 }
127124
128125 [ SpecialName , PropertyMethod ]
@@ -230,7 +227,7 @@ private void SetLineNumber(int newLineNum) {
230227
231228 Dictionary < int , bool > currentLoopIds = null ;
232229 bool inForLoopOrFinally = loopAndFinallyLocations != null && loopAndFinallyLocations . TryGetValue ( _lineNo , out currentLoopIds ) ;
233-
230+
234231 int originalNewLine = newLineNum ;
235232
236233 if ( newLineNum < funcCode . Span . Start . Line ) {
@@ -246,7 +243,7 @@ private void SetLineNumber(int newLineNum) {
246243 // Check if we're jumping onto a handler
247244 bool handlerIsFinally ;
248245 if ( handlerLocations != null && handlerLocations . TryGetValue ( newLineNum , out handlerIsFinally ) ) {
249- throw PythonOps . ValueError ( "can't jump to 'except' line" ) ;
246+ throw PythonOps . ValueError ( "can't jump to 'except' line" ) ;
250247 }
251248
252249 // Check if we're jumping into a for-loop
0 commit comments