@@ -120,7 +120,7 @@ suite('InlineScriptLazyDetector', () => {
120120 changeListener ! ( makeChange ( uri , changes ) ) ;
121121 }
122122
123- // Filter `sendTelemetryStub.getCalls()` to a single PEP 723 event name.
123+ // Filter `sendTelemetryStub.getCalls()` to a single inline script event name.
124124 function callsFor ( name : EventNames ) : sinon . SinonSpyCall [ ] {
125125 return sendTelemetryStub . getCalls ( ) . filter ( ( c ) => c . args [ 0 ] === name ) ;
126126 }
@@ -224,7 +224,7 @@ suite('InlineScriptLazyDetector', () => {
224224 // further work — including the detection telemetry event.
225225 resolveRead ! ( VALID_METADATA ) ;
226226 await assert . doesNotReject ( inFlight ?? Promise . resolve ( ) ) ;
227- assert . strictEqual ( callsFor ( EventNames . PEP723_DETECTED ) . length , 0 , 'no detection event after dispose' ) ;
227+ assert . strictEqual ( callsFor ( EventNames . INLINE_SCRIPT_DETECTED ) . length , 0 , 'no detection event after dispose' ) ;
228228 } ) ;
229229
230230 // ---------- catch-up replay over `getOpenTextDocuments` ----------
@@ -271,47 +271,47 @@ suite('InlineScriptLazyDetector', () => {
271271 assert . ok ( readMetadataStub . notCalled , 'dispose() must clear the pending setImmediate handle' ) ;
272272 } ) ;
273273
274- // ---------- PEP723.DETECTED telemetry ----------
274+ // ---------- inlineScript.detected telemetry ----------
275275
276- test ( 'PEP723.DETECTED fires once with trigger=open + dependencyCount + hasRequiresPython' , async ( ) => {
276+ test ( 'inlineScript.detected fires once with trigger=open + dependencyCount + hasRequiresPython' , async ( ) => {
277277 const uri = Uri . file ( path . resolve ( '/ws/detect.py' ) ) ;
278278 readMetadataStub . resolves ( VALID_METADATA ) ;
279279 const detector = new InlineScriptLazyDetector ( ) ;
280280 detector . activate ( ) ;
281281 await fireOpen ( uri ) ;
282282
283- const detectedCalls = callsFor ( EventNames . PEP723_DETECTED ) ;
283+ const detectedCalls = callsFor ( EventNames . INLINE_SCRIPT_DETECTED ) ;
284284 assert . strictEqual ( detectedCalls . length , 1 , 'detection event should fire exactly once' ) ;
285285 const [ , measures , properties ] = detectedCalls [ 0 ] . args ;
286286 assert . deepStrictEqual ( measures , { dependencyCount : 2 } ) ;
287287 assert . deepStrictEqual ( properties , { trigger : 'open' , hasRequiresPython : true } ) ;
288288 detector . dispose ( ) ;
289289 } ) ;
290290
291- test ( 'PEP723.DETECTED fires with trigger=save when surfaced by a save event' , async ( ) => {
291+ test ( 'inlineScript.detected fires with trigger=save when surfaced by a save event' , async ( ) => {
292292 const uri = Uri . file ( path . resolve ( '/ws/detectOnSave.py' ) ) ;
293293 readMetadataStub . resolves ( VALID_METADATA ) ;
294294 const detector = new InlineScriptLazyDetector ( ) ;
295295 detector . activate ( ) ;
296296 await fireSave ( uri ) ;
297297
298- const detectedCalls = callsFor ( EventNames . PEP723_DETECTED ) ;
298+ const detectedCalls = callsFor ( EventNames . INLINE_SCRIPT_DETECTED ) ;
299299 assert . strictEqual ( detectedCalls . length , 1 ) ;
300300 assert . strictEqual ( detectedCalls [ 0 ] . args [ 2 ] . trigger , 'save' ) ;
301301 detector . dispose ( ) ;
302302 } ) ;
303303
304- test ( 'PEP723.DETECTED does not fire when the file has no metadata block' , async ( ) => {
304+ test ( 'inlineScript.detected does not fire when the file has no metadata block' , async ( ) => {
305305 const uri = Uri . file ( path . resolve ( '/ws/plain.py' ) ) ;
306306 readMetadataStub . resolves ( undefined ) ;
307307 const detector = new InlineScriptLazyDetector ( ) ;
308308 detector . activate ( ) ;
309309 await fireOpen ( uri ) ;
310- assert . strictEqual ( callsFor ( EventNames . PEP723_DETECTED ) . length , 0 ) ;
310+ assert . strictEqual ( callsFor ( EventNames . INLINE_SCRIPT_DETECTED ) . length , 0 ) ;
311311 detector . dispose ( ) ;
312312 } ) ;
313313
314- test ( 'PEP723.DETECTED is deduplicated across repeated opens and saves of the same URI' , async ( ) => {
314+ test ( 'inlineScript.detected is deduplicated across repeated opens and saves of the same URI' , async ( ) => {
315315 const uri = Uri . file ( path . resolve ( '/ws/repeat.py' ) ) ;
316316 readMetadataStub . resolves ( VALID_METADATA ) ;
317317 const detector = new InlineScriptLazyDetector ( ) ;
@@ -320,11 +320,11 @@ suite('InlineScriptLazyDetector', () => {
320320 await fireSave ( uri ) ;
321321 await fireSave ( uri ) ;
322322 await fireOpen ( uri ) ;
323- assert . strictEqual ( callsFor ( EventNames . PEP723_DETECTED ) . length , 1 , 'detection event must dedup per session' ) ;
323+ assert . strictEqual ( callsFor ( EventNames . INLINE_SCRIPT_DETECTED ) . length , 1 , 'detection event must dedup per session' ) ;
324324 detector . dispose ( ) ;
325325 } ) ;
326326
327- test ( 'PEP723.DETECTED reports hasRequiresPython=false when not declared' , async ( ) => {
327+ test ( 'inlineScript.detected reports hasRequiresPython=false when not declared' , async ( ) => {
328328 const uri = Uri . file ( path . resolve ( '/ws/noPython.py' ) ) ;
329329 readMetadataStub . resolves ( {
330330 requiresPython : undefined ,
@@ -336,23 +336,23 @@ suite('InlineScriptLazyDetector', () => {
336336 detector . activate ( ) ;
337337 await fireOpen ( uri ) ;
338338
339- const [ , measures , properties ] = callsFor ( EventNames . PEP723_DETECTED ) [ 0 ] . args ;
339+ const [ , measures , properties ] = callsFor ( EventNames . INLINE_SCRIPT_DETECTED ) [ 0 ] . args ;
340340 assert . deepStrictEqual ( measures , { dependencyCount : 0 } ) ;
341341 assert . deepStrictEqual ( properties , { trigger : 'open' , hasRequiresPython : false } ) ;
342342 detector . dispose ( ) ;
343343 } ) ;
344344
345- // ---------- PEP723.EDITED telemetry ----------
345+ // ---------- inlineScript.edited telemetry ----------
346346
347- test ( 'PEP723.EDITED fires once on first content change after detection' , async ( ) => {
347+ test ( 'inlineScript.edited fires once on first content change after detection' , async ( ) => {
348348 const uri = Uri . file ( path . resolve ( '/ws/edit.py' ) ) ;
349349 readMetadataStub . resolves ( VALID_METADATA ) ;
350350 const detector = new InlineScriptLazyDetector ( ) ;
351351 detector . activate ( ) ;
352352 await fireOpen ( uri ) ;
353353 fireChange ( uri ) ;
354354
355- const editedCalls = callsFor ( EventNames . PEP723_EDITED ) ;
355+ const editedCalls = callsFor ( EventNames . INLINE_SCRIPT_EDITED ) ;
356356 assert . strictEqual ( editedCalls . length , 1 , 'edited event should fire exactly once' ) ;
357357 // Second arg is the measure (number → { duration }); accept either form.
358358 const measureArg = editedCalls [ 0 ] . args [ 1 ] ;
@@ -361,7 +361,7 @@ suite('InlineScriptLazyDetector', () => {
361361 detector . dispose ( ) ;
362362 } ) ;
363363
364- test ( 'PEP723.EDITED is deduplicated across repeated edits of the same URI' , async ( ) => {
364+ test ( 'inlineScript.edited is deduplicated across repeated edits of the same URI' , async ( ) => {
365365 const uri = Uri . file ( path . resolve ( '/ws/multiEdit.py' ) ) ;
366366 readMetadataStub . resolves ( VALID_METADATA ) ;
367367 const detector = new InlineScriptLazyDetector ( ) ;
@@ -370,22 +370,22 @@ suite('InlineScriptLazyDetector', () => {
370370 fireChange ( uri ) ;
371371 fireChange ( uri ) ;
372372 fireChange ( uri ) ;
373- assert . strictEqual ( callsFor ( EventNames . PEP723_EDITED ) . length , 1 ) ;
373+ assert . strictEqual ( callsFor ( EventNames . INLINE_SCRIPT_EDITED ) . length , 1 ) ;
374374 detector . dispose ( ) ;
375375 } ) ;
376376
377- test ( 'PEP723.EDITED does not fire for changes on a URI that was never detected' , async ( ) => {
377+ test ( 'inlineScript.edited does not fire for changes on a URI that was never detected' , async ( ) => {
378378 const uri = Uri . file ( path . resolve ( '/ws/notDetected.py' ) ) ;
379379 readMetadataStub . resolves ( undefined ) ;
380380 const detector = new InlineScriptLazyDetector ( ) ;
381381 detector . activate ( ) ;
382382 await fireOpen ( uri ) ;
383383 fireChange ( uri ) ;
384- assert . strictEqual ( callsFor ( EventNames . PEP723_EDITED ) . length , 0 ) ;
384+ assert . strictEqual ( callsFor ( EventNames . INLINE_SCRIPT_EDITED ) . length , 0 ) ;
385385 detector . dispose ( ) ;
386386 } ) ;
387387
388- test ( 'PEP723.EDITED ignores change events with no content changes' , async ( ) => {
388+ test ( 'inlineScript.edited ignores change events with no content changes' , async ( ) => {
389389 const uri = Uri . file ( path . resolve ( '/ws/noOpChange.py' ) ) ;
390390 readMetadataStub . resolves ( VALID_METADATA ) ;
391391 const detector = new InlineScriptLazyDetector ( ) ;
@@ -395,14 +395,14 @@ suite('InlineScriptLazyDetector', () => {
395395 // array for things like dirty-state toggles; that's not a user
396396 // edit and must not count.
397397 fireChange ( uri , [ ] ) ;
398- assert . strictEqual ( callsFor ( EventNames . PEP723_EDITED ) . length , 0 ) ;
398+ assert . strictEqual ( callsFor ( EventNames . INLINE_SCRIPT_EDITED ) . length , 0 ) ;
399399 // A real edit still counts after the no-op was ignored.
400400 fireChange ( uri ) ;
401- assert . strictEqual ( callsFor ( EventNames . PEP723_EDITED ) . length , 1 ) ;
401+ assert . strictEqual ( callsFor ( EventNames . INLINE_SCRIPT_EDITED ) . length , 1 ) ;
402402 detector . dispose ( ) ;
403403 } ) ;
404404
405- test ( 'PEP723.EDITED is suppressed after dispose()' , async ( ) => {
405+ test ( 'inlineScript.edited is suppressed after dispose()' , async ( ) => {
406406 const uri = Uri . file ( path . resolve ( '/ws/disposedEdit.py' ) ) ;
407407 readMetadataStub . resolves ( VALID_METADATA ) ;
408408 const detector = new InlineScriptLazyDetector ( ) ;
@@ -411,7 +411,7 @@ suite('InlineScriptLazyDetector', () => {
411411 const grabbedChangeListener = changeListener ! ;
412412 detector . dispose ( ) ;
413413 grabbedChangeListener ( makeChange ( uri ) ) ;
414- assert . strictEqual ( callsFor ( EventNames . PEP723_EDITED ) . length , 0 ) ;
414+ assert . strictEqual ( callsFor ( EventNames . INLINE_SCRIPT_EDITED ) . length , 0 ) ;
415415 } ) ;
416416} ) ;
417417
0 commit comments