@@ -18,7 +18,7 @@ declare var Tests: any;
18
18
declare var Module : any ;
19
19
declare var validSuspender : { value : boolean } ;
20
20
21
- import { TypedArray } from "types" ;
21
+ import type { TypedArray } from "types" ;
22
22
import { warnOnce } from "pyodide-util" ;
23
23
24
24
// pyodide-skip
@@ -102,7 +102,7 @@ if (globalThis.FinalizationRegistry) {
102
102
// }
103
103
// });
104
104
} else {
105
- Module . finalizationRegistry = { register ( ) { } , unregister ( ) { } } ;
105
+ Module . finalizationRegistry = { register ( ) { } , unregister ( ) { } } ;
106
106
// Module.bufferFinalizationRegistry = finalizationRegistry;
107
107
}
108
108
@@ -120,8 +120,8 @@ Module.enable_pyproxy_allocation_tracing = function () {
120
120
} ;
121
121
} ;
122
122
Module . disable_pyproxy_allocation_tracing = function ( ) {
123
- trace_pyproxy_alloc = function ( proxy : any ) { } ;
124
- trace_pyproxy_dealloc = function ( proxy : any ) { } ;
123
+ trace_pyproxy_alloc = function ( proxy : any ) { } ;
124
+ trace_pyproxy_dealloc = function ( proxy : any ) { } ;
125
125
} ;
126
126
Module . disable_pyproxy_allocation_tracing ( ) ;
127
127
@@ -237,7 +237,7 @@ function pyproxy_new(
237
237
// `setPrototypeOf`. The documentation for `setPrototypeOf` says to use
238
238
// `Object.create` or `Reflect.construct` instead for performance reasons
239
239
// but neither of those work here.
240
- target = function ( ) { } ;
240
+ target = function ( ) { } ;
241
241
Object . setPrototypeOf ( target , cls . prototype ) ;
242
242
// Remove undesirable properties added by Function constructor. Note: we
243
243
// can't remove "arguments" or "caller" because they are not configurable
@@ -409,7 +409,7 @@ Module.getPyProxyClass = function (flags: number) {
409
409
) ;
410
410
const super_proto = flags & IS_CALLABLE ? PyProxyFunctionProto : PyProxyProto ;
411
411
const sub_proto = Object . create ( super_proto , descriptors ) ;
412
- function NewPyProxyClass ( ) { }
412
+ function NewPyProxyClass ( ) { }
413
413
NewPyProxyClass . prototype = sub_proto ;
414
414
pyproxyClassMap . set ( flags , NewPyProxyClass ) ;
415
415
return NewPyProxyClass ;
@@ -820,7 +820,7 @@ const PyProxyFunctionProto = Object.create(
820
820
Function . prototype ,
821
821
Object . getOwnPropertyDescriptors ( PyProxyProto ) ,
822
822
) ;
823
- function PyProxyFunction ( ) { }
823
+ function PyProxyFunction ( ) { }
824
824
PyProxyFunction . prototype = PyProxyFunctionProto ;
825
825
826
826
/**
@@ -834,7 +834,7 @@ export class PyProxyWithLength extends PyProxy {
834
834
}
835
835
}
836
836
837
- export interface PyProxyWithLength extends PyLengthMethods { }
837
+ export interface PyProxyWithLength extends PyLengthMethods { }
838
838
839
839
// Controlled by HAS_LENGTH, appears for any object with __len__ or sq_length
840
840
// or mp_length methods
@@ -870,7 +870,7 @@ export class PyProxyWithGet extends PyProxy {
870
870
}
871
871
}
872
872
873
- export interface PyProxyWithGet extends PyGetItemMethods { }
873
+ export interface PyProxyWithGet extends PyGetItemMethods { }
874
874
875
875
class PyAsJsonAdaptorMethods {
876
876
asJsJson ( ) {
@@ -955,7 +955,7 @@ export class PyProxyWithSet extends PyProxy {
955
955
}
956
956
}
957
957
958
- export interface PyProxyWithSet extends PySetItemMethods { }
958
+ export interface PyProxyWithSet extends PySetItemMethods { }
959
959
// Controlled by HAS_SET, appears for any class with __setitem__, __delitem__,
960
960
// mp_ass_subscript, or sq_ass_item.
961
961
export class PySetItemMethods {
@@ -1011,7 +1011,7 @@ export class PyProxyWithHas extends PyProxy {
1011
1011
}
1012
1012
}
1013
1013
1014
- export interface PyProxyWithHas extends PyContainsMethods { }
1014
+ export interface PyProxyWithHas extends PyContainsMethods { }
1015
1015
1016
1016
// Controlled by HAS_CONTAINS flag, appears for any class with __contains__ or
1017
1017
// sq_contains
@@ -1090,7 +1090,7 @@ function* iter_helper(
1090
1090
"This borrowed proxy was automatically destroyed when an iterator was exhausted." ,
1091
1091
) ,
1092
1092
) ;
1093
- } catch ( e ) { }
1093
+ } catch ( e ) { }
1094
1094
if ( _PyErr_Occurred ( ) ) {
1095
1095
_pythonexc2js ( ) ;
1096
1096
}
@@ -1109,7 +1109,7 @@ export class PyIterable extends PyProxy {
1109
1109
}
1110
1110
}
1111
1111
1112
- export interface PyIterable extends PyIterableMethods { }
1112
+ export interface PyIterable extends PyIterableMethods { }
1113
1113
1114
1114
// Controlled by IS_ITERABLE, appears for any object with __iter__ or tp_iter,
1115
1115
// unless they are iterators. See: https://docs.python.org/3/c-api/iter.html
@@ -1217,7 +1217,7 @@ export class PyAsyncIterable extends PyProxy {
1217
1217
}
1218
1218
}
1219
1219
1220
- export interface PyAsyncIterable extends PyAsyncIterableMethods { }
1220
+ export interface PyAsyncIterable extends PyAsyncIterableMethods { }
1221
1221
1222
1222
export class PyAsyncIterableMethods {
1223
1223
/**
@@ -1258,7 +1258,7 @@ export class PyIterator extends PyProxy {
1258
1258
}
1259
1259
}
1260
1260
1261
- export interface PyIterator extends PyIteratorMethods { }
1261
+ export interface PyIterator extends PyIteratorMethods { }
1262
1262
1263
1263
// Controlled by IS_ITERATOR, appears for any object with a __next__ or
1264
1264
// tp_iternext method.
@@ -1311,7 +1311,7 @@ export class PyGenerator extends PyProxy {
1311
1311
}
1312
1312
}
1313
1313
1314
- export interface PyGenerator extends PyGeneratorMethods { }
1314
+ export interface PyGenerator extends PyGeneratorMethods { }
1315
1315
1316
1316
export class PyGeneratorMethods {
1317
1317
/**
@@ -1387,7 +1387,7 @@ export class PyAsyncIterator extends PyProxy {
1387
1387
}
1388
1388
}
1389
1389
1390
- export interface PyAsyncIterator extends PyAsyncIteratorMethods { }
1390
+ export interface PyAsyncIterator extends PyAsyncIteratorMethods { }
1391
1391
1392
1392
export class PyAsyncIteratorMethods {
1393
1393
/** @private */
@@ -1451,7 +1451,7 @@ export class PyAsyncGenerator extends PyProxy {
1451
1451
}
1452
1452
}
1453
1453
1454
- export interface PyAsyncGenerator extends PyAsyncGeneratorMethods { }
1454
+ export interface PyAsyncGenerator extends PyAsyncGeneratorMethods { }
1455
1455
1456
1456
export class PyAsyncGeneratorMethods {
1457
1457
/**
@@ -1554,7 +1554,7 @@ export class PySequence extends PyProxy {
1554
1554
}
1555
1555
}
1556
1556
1557
- export interface PySequence extends PySequenceMethods { }
1557
+ export interface PySequence extends PySequenceMethods { }
1558
1558
1559
1559
// JS default comparison is to convert to strings and compare lexicographically
1560
1560
function defaultCompareFunc ( a : any , b : any ) : number {
@@ -1861,7 +1861,7 @@ export class PyMutableSequence extends PyProxy {
1861
1861
}
1862
1862
}
1863
1863
1864
- export interface PyMutableSequence extends PyMutableSequenceMethods { }
1864
+ export interface PyMutableSequence extends PyMutableSequenceMethods { }
1865
1865
1866
1866
export class PyMutableSequenceMethods {
1867
1867
/**
@@ -2434,7 +2434,7 @@ export class PyAwaitable extends PyProxy {
2434
2434
}
2435
2435
}
2436
2436
2437
- export interface PyAwaitable extends Promise < any > { }
2437
+ export interface PyAwaitable extends Promise < any > { }
2438
2438
2439
2439
/**
2440
2440
* The Promise / JavaScript awaitable API.
@@ -2848,7 +2848,7 @@ export class PyBuffer extends PyProxy {
2848
2848
}
2849
2849
}
2850
2850
2851
- export interface PyBuffer extends PyBufferMethods { }
2851
+ export interface PyBuffer extends PyBufferMethods { }
2852
2852
2853
2853
export class PyBufferMethods {
2854
2854
/**
@@ -2923,11 +2923,11 @@ export class PyBufferMethods {
2923
2923
if ( bigEndian && alignment > 1 ) {
2924
2924
throw new Error (
2925
2925
"Javascript has no native support for big endian buffers. " +
2926
- "In this case, you can pass an explicit type argument. " +
2927
- "For instance, `getBuffer('dataview')` will return a `DataView`" +
2928
- "which has native support for reading big endian data. " +
2929
- "Alternatively, toJs will automatically convert the buffer " +
2930
- "to little endian." ,
2926
+ "In this case, you can pass an explicit type argument. " +
2927
+ "For instance, `getBuffer('dataview')` will return a `DataView`" +
2928
+ "which has native support for reading big endian data. " +
2929
+ "Alternatively, toJs will automatically convert the buffer " +
2930
+ "to little endian." ,
2931
2931
) ;
2932
2932
}
2933
2933
let numBytes = largest_ptr - smallest_ptr ;
@@ -3002,10 +3002,10 @@ export class PyDict extends PyProxy {
3002
3002
3003
3003
export interface PyDict
3004
3004
extends PyProxyWithGet ,
3005
- PyProxyWithSet ,
3006
- PyProxyWithHas ,
3007
- PyProxyWithLength ,
3008
- PyIterable { }
3005
+ PyProxyWithSet ,
3006
+ PyProxyWithHas ,
3007
+ PyProxyWithLength ,
3008
+ PyIterable { }
3009
3009
3010
3010
/**
3011
3011
* A class to allow access to Python data buffers from JavaScript. These are
0 commit comments