diff --git a/crates/stdlib/src/_asyncio.rs b/crates/stdlib/src/_asyncio.rs index 4d1ec084c..354d0d899 100644 --- a/crates/stdlib/src/_asyncio.rs +++ b/crates/stdlib/src/_asyncio.rs @@ -2815,7 +2815,7 @@ pub(crate) mod _asyncio { prev } - /// Reset task state after fork in child process. + // Reset task state after fork in child process. #[pyfunction] #[allow(clippy::unnecessary_wraps)] // keep PyResult for consistency with sibling module functions fn _on_fork(vm: &VirtualMachine) -> PyResult<()> { @@ -2916,7 +2916,7 @@ pub(crate) mod _asyncio { } } - /// TaskWakeupMethWrapper - wrapper for task wakeup callback with proper repr + // TaskWakeupMethWrapper - wrapper for task wakeup callback with proper repr #[pyattr] #[pyclass(name, traverse)] #[derive(Debug, PyPayload)] diff --git a/crates/stdlib/src/cjkcodecs/multibytecodec.rs b/crates/stdlib/src/cjkcodecs/multibytecodec.rs index 84cdc1fcd..c09e550c6 100644 --- a/crates/stdlib/src/cjkcodecs/multibytecodec.rs +++ b/crates/stdlib/src/cjkcodecs/multibytecodec.rs @@ -614,9 +614,9 @@ mod _multibytecodec { Ok(PyRef::new_ref(payload, class, None).into()) } - /// `__create_codec`, which turns the capsule `getcodec` hands it into a - /// codec object. Nothing here carries a codec in a capsule, so the argument - /// check rejects everything a caller can pass. + // `__create_codec`, which turns the capsule `getcodec` hands it into a + // codec object. Nothing here carries a codec in a capsule, so the argument + // check rejects everything a caller can pass. #[pyfunction(name = "__create_codec")] fn create_codec(_arg: PyObjectRef, vm: &VirtualMachine) -> PyResult { Err(vm.new_value_error("argument type invalid")) diff --git a/crates/stdlib/src/elementtree.rs b/crates/stdlib/src/elementtree.rs index df2ee4d81..857b4d980 100644 --- a/crates/stdlib/src/elementtree.rs +++ b/crates/stdlib/src/elementtree.rs @@ -37,10 +37,10 @@ pub(crate) mod _elementtree { }; use rustpython_common::lock::PyRwLock; - /// The per-module bookkeeping `_elementtree.c` keeps in its - /// `elementtreestate`: the `Comment`/`ProcessingInstruction` factories - /// installed by `_set_factories`, and two helpers imported from Python - /// the first time they are needed. + // The per-module bookkeeping `_elementtree.c` keeps in its + // `elementtreestate`: the `Comment`/`ProcessingInstruction` factories + // installed by `_set_factories`, and two helpers imported from Python + // the first time they are needed. #[pyclass(no_attr, module = "_elementtree", name = "_elementtree_state")] #[derive(Debug, Default, PyPayload)] pub(crate) struct ElementTreeState { @@ -2365,9 +2365,9 @@ pub(crate) mod _elementtree { child_index: usize, } - /// Pre-order traversal shared by `Element.iter()` and - /// `Element.itertext()`, kept as an explicit parent stack so a deep tree - /// costs no Rust recursion. + // Pre-order traversal shared by `Element.iter()` and + // `Element.itertext()`, kept as an explicit parent stack so a deep tree + // costs no Rust recursion. #[pyclass(no_attr, module = "_elementtree", name = "_element_iterator")] #[derive(Debug, PyPayload)] pub(crate) struct PyElementIter { diff --git a/crates/stdlib/src/json.rs b/crates/stdlib/src/json.rs index 7e7e622bf..8b9da96cc 100644 --- a/crates/stdlib/src/json.rs +++ b/crates/stdlib/src/json.rs @@ -754,12 +754,12 @@ mod _json { Ok(result) } - /// `_json.make_encoder`, mirroring CPython's `Modules/_json.c` `PyEncoderObject`. - /// - /// Encodes directly into a single growable buffer instead of building a - /// generator of chunks, then returns that buffer as a one-element tuple - /// (matching what `json/encoder.py`'s `encode()` does with the result: - /// `''.join(chunks)`). + // `_json.make_encoder` (`PyEncoderObject`). + // + // Encodes directly into a single growable buffer instead of building a + // generator of chunks, then returns that buffer as a one-element tuple + // (matching what `json/encoder.py`'s `encode()` does with the result: + // `''.join(chunks)`). #[pyattr(name = "make_encoder")] #[pyclass(name = "Encoder", traverse)] #[derive(Debug, PyPayload)] diff --git a/crates/stdlib/src/multiprocessing.rs b/crates/stdlib/src/multiprocessing.rs index f8b11e46a..fbbc2e1b9 100644 --- a/crates/stdlib/src/multiprocessing.rs +++ b/crates/stdlib/src/multiprocessing.rs @@ -736,7 +736,7 @@ mod _multiprocessing { self.release(vm) } - /// Rebuild a SemLock from pickled state. + // Rebuild a SemLock from pickled state. // _multiprocessing_SemLock__rebuild_impl #[pyclassmethod(name = "_rebuild")] fn rebuild( @@ -895,7 +895,7 @@ mod _multiprocessing { } } - /// Function to unlink semaphore names. + // Function to unlink semaphore names. // _PyMp_sem_unlink. #[pyfunction] fn sem_unlink(name: String, vm: &VirtualMachine) -> PyResult<()> { @@ -908,7 +908,7 @@ mod _multiprocessing { }) } - /// Module-level flags dict. + // Module-level flags dict. #[pyattr] fn flags(vm: &VirtualMachine) -> PyRef { let flags = vm.ctx.new_dict(); diff --git a/crates/stdlib/src/pickle.rs b/crates/stdlib/src/pickle.rs index 5ee195078..30e7d1e1a 100644 --- a/crates/stdlib/src/pickle.rs +++ b/crates/stdlib/src/pickle.rs @@ -23,10 +23,10 @@ mod _pickle { use num_traits::{ToPrimitive, Zero}; use std::collections::HashMap; - /// The highest protocol number `_pickle` knows how to read. + // The highest protocol number `_pickle` knows how to read. #[pyattr] const HIGHEST_PROTOCOL: u8 = 5; - /// The protocol `dumps`/`dump` use when no protocol is given. + // The protocol `dumps`/`dump` use when no protocol is given. #[pyattr] const DEFAULT_PROTOCOL: u8 = 5; @@ -565,7 +565,7 @@ mod _pickle { load_impl(zelf, vm) } - /// The default hook: no persistent ids are supported. + // The default hook: no persistent ids are supported. #[pymethod] fn persistent_load(&self, _pid: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> { Err(new_unpickling_error( @@ -2049,7 +2049,7 @@ mod _pickle { self.memo.write().clear(); } - /// The default hook: nothing has a persistent id. + // The default hook: nothing has a persistent id. #[pymethod] fn persistent_id(&self, _obj: PyObjectRef, vm: &VirtualMachine) -> PyObjectRef { vm.ctx.none() diff --git a/crates/stdlib/src/resource.rs b/crates/stdlib/src/resource.rs index 2a95f28db..0e2a777e6 100644 --- a/crates/stdlib/src/resource.rs +++ b/crates/stdlib/src/resource.rs @@ -116,8 +116,8 @@ mod resource { } } - /// The exception the module reports its failures through, which is the one - /// every other call raises. + // The exception the module reports its failures through, which is the one + // every other call raises. #[pyattr(name = "error", once)] fn error(vm: &VirtualMachine) -> PyObjectRef { vm.ctx.exceptions.os_error.to_owned().into() diff --git a/crates/stdlib/src/ssl.rs b/crates/stdlib/src/ssl.rs index 1f4340074..14701109e 100644 --- a/crates/stdlib/src/ssl.rs +++ b/crates/stdlib/src/ssl.rs @@ -201,17 +201,17 @@ mod _ssl { const VERIFY_CRL_CHECK_LEAF: i32 = rustpython_host_env::ssl::VERIFY_CRL_CHECK_LEAF; #[pyattr] const VERIFY_CRL_CHECK_CHAIN: i32 = rustpython_host_env::ssl::VERIFY_CRL_CHECK_CHAIN; - /// VERIFY_X509_STRICT flag for RFC 5280 strict compliance - /// When set, performs additional validation including AKI extension checks + // VERIFY_X509_STRICT flag for RFC 5280 strict compliance + // When set, performs additional validation including AKI extension checks #[pyattr] pub(crate) const VERIFY_X509_STRICT: i32 = rustpython_host_env::ssl::VERIFY_X509_STRICT; #[pyattr] const VERIFY_ALLOW_PROXY_CERTS: i32 = rustpython_host_env::ssl::VERIFY_ALLOW_PROXY_CERTS; #[pyattr] const VERIFY_X509_TRUSTED_FIRST: i32 = rustpython_host_env::ssl::VERIFY_X509_TRUSTED_FIRST; - /// VERIFY_X509_PARTIAL_CHAIN flag for partial chain validation - /// When set, accept certificates if any certificate in the chain is in the trust store - /// (not just root CAs). This matches OpenSSL's X509_V_FLAG_PARTIAL_CHAIN behavior. + // VERIFY_X509_PARTIAL_CHAIN flag for partial chain validation + // When set, accept certificates if any certificate in the chain is in the trust store + // (not just root CAs). This matches OpenSSL's X509_V_FLAG_PARTIAL_CHAIN behavior. #[pyattr] pub(crate) const VERIFY_X509_PARTIAL_CHAIN: i32 = rustpython_host_env::ssl::VERIFY_X509_PARTIAL_CHAIN; @@ -4182,10 +4182,10 @@ mod _ssl { Ok((bytes, true)) } - /// Test helper to decode a certificate from a file path - /// - /// This is a simplified wrapper around cert_der_to_dict_helper that handles - /// file reading and PEM/DER auto-detection. Used by test suite. + // Test helper to decode a certificate from a file path + // + // This is a simplified wrapper around cert_der_to_dict_helper that handles + // file reading and PEM/DER auto-detection. Used by test suite. #[pyfunction] fn _test_decode_cert(path: PyUtf8StrRef, vm: &VirtualMachine) -> PyResult { // Read certificate file diff --git a/crates/vm/src/builtins/asyncgenerator.rs b/crates/vm/src/builtins/asyncgenerator.rs index 7ff13e4be..291fe2537 100644 --- a/crates/vm/src/builtins/asyncgenerator.rs +++ b/crates/vm/src/builtins/asyncgenerator.rs @@ -668,8 +668,8 @@ impl Destructor for PyAsyncGenAThrow { } } -/// Awaitable wrapper for anext() builtin with default value. -/// When StopAsyncIteration is raised, it converts it to StopIteration(default). +// Awaitable wrapper for anext() builtin with default value. +// When StopAsyncIteration is raised, it converts it to StopIteration(default). #[pyclass(module = false, name = "anext_awaitable", traverse = "manual")] #[derive(Debug)] pub(crate) struct PyAnextAwaitable { diff --git a/crates/vm/src/builtins/descriptor.rs b/crates/vm/src/builtins/descriptor.rs index 193048a8a..8456d179e 100644 --- a/crates/vm/src/builtins/descriptor.rs +++ b/crates/vm/src/builtins/descriptor.rs @@ -172,7 +172,7 @@ impl Representable for PyMethodDescriptor { } } -/// METH_CLASS descriptors. Same layout as method_descriptor; a distinct type. +// METH_CLASS descriptors. Same layout as method_descriptor; a distinct type. #[pyclass(name = "classmethod_descriptor", module = false)] pub struct PyClassMethodDescriptor { #[pymember(name = "__objclass__", path = "typ")] @@ -1858,7 +1858,7 @@ fn parse_buffer_flags( Ok(crate::protocol::BufferFlags::from_bits_retain(flags as u32)) } -/// wrapper_descriptor: wraps a slot function as a Python method +// wrapper_descriptor: wraps a slot function as a Python method // = PyWrapperDescrObject #[pyclass(name = "wrapper_descriptor", module = false)] #[derive(Debug)] @@ -1963,8 +1963,8 @@ impl Representable for PyWrapper { // PyMethodWrapper - method-wrapper -/// method-wrapper: a slot wrapper bound to an instance -/// Returned when accessing l.__init__ on an instance +// method-wrapper: a slot wrapper bound to an instance +// Returned when accessing l.__init__ on an instance #[pyclass(name = "method-wrapper", module = false, traverse)] #[derive(Debug)] pub(crate) struct PyMethodWrapper { diff --git a/crates/vm/src/builtins/object.rs b/crates/vm/src/builtins/object.rs index 1f59f1290..da92df65f 100644 --- a/crates/vm/src/builtins/object.rs +++ b/crates/vm/src/builtins/object.rs @@ -333,7 +333,7 @@ impl PyBaseObject { obj.generic_setattr(attr_name, value, vm) } - /// Return str(self). + // Return str(self). #[pyslot] fn slot_str(zelf: &PyObject, vm: &VirtualMachine) -> PyResult { // FIXME: try tp_repr first and fallback to object.__repr__ @@ -472,9 +472,9 @@ impl PyBaseObject { } } - /// Return getattr(self, name). - /// - /// __getattribute__ is added as a slot wrapper by add_operators. + // Return getattr(self, name). + // + // __getattribute__ is added as a slot wrapper by add_operators. #[pyslot] pub(crate) fn getattro(obj: &PyObject, name: &Py, vm: &VirtualMachine) -> PyResult { vm_trace!("object.__getattribute__({:?}, {:?})", obj, name); diff --git a/crates/vm/src/exceptions.rs b/crates/vm/src/exceptions.rs index 588754bb3..6fc24360e 100644 --- a/crates/vm/src/exceptions.rs +++ b/crates/vm/src/exceptions.rs @@ -3495,7 +3495,7 @@ pub(super) mod types { } } - /// JIT error. + // JIT error. #[cfg(feature = "jit")] #[pyexception(name, base = PyException, ctx = "jit_error", impl)] #[derive(Debug)] diff --git a/crates/vm/src/frame.rs b/crates/vm/src/frame.rs index 13a4282a4..ccdf4f99c 100644 --- a/crates/vm/src/frame.rs +++ b/crates/vm/src/frame.rs @@ -1523,8 +1523,7 @@ impl InterpreterFrame { } } -/// Python-visible frame object. Currently always wraps an `InterpreterFrame`. -/// Analogous to CPython's `PyFrameObject`. +// Python-visible frame object (`PyFrameObject`). Currently always wraps an `InterpreterFrame`. #[pyclass(module = false, name = "frame", traverse = "manual")] pub struct FrameObject { // The executing iframe reads this when it points at the frame object. diff --git a/crates/vm/src/object/core.rs b/crates/vm/src/object/core.rs index 594e206fa..4f98bd7e2 100644 --- a/crates/vm/src/object/core.rs +++ b/crates/vm/src/object/core.rs @@ -1012,8 +1012,8 @@ unsafe impl Link for WeakLink { } } -/// PyWeakReference: each weakref holds a direct pointer to its referent. -#[pyclass(name = "weakref", module = false)] +// PyWeakReference: each weakref holds a direct pointer to its referent. +#[pyclass(name = "ReferenceType", module = "weakref")] #[derive(Debug)] pub struct PyWeak { pointers: Pointers>, diff --git a/crates/vm/src/stdlib/_abc.rs b/crates/vm/src/stdlib/_abc.rs index f4e109072..e75a28533 100644 --- a/crates/vm/src/stdlib/_abc.rs +++ b/crates/vm/src/stdlib/_abc.rs @@ -28,7 +28,7 @@ mod _abc { ABC_INVALIDATION_COUNTER.fetch_add(1, Ordering::SeqCst); } - /// Internal state held by ABC machinery. + // Internal state held by ABC machinery. #[pyattr] #[pyclass(name = "_abc_data", module = "_abc")] #[derive(Debug, PyPayload)] diff --git a/crates/vm/src/stdlib/_ctypes.rs b/crates/vm/src/stdlib/_ctypes.rs index 8ba26c1ab..84dbcd139 100644 --- a/crates/vm/src/stdlib/_ctypes.rs +++ b/crates/vm/src/stdlib/_ctypes.rs @@ -102,8 +102,8 @@ pub(crate) mod _ctypes { use crate::{AsObject, Py, PyObjectRef, PyPayload, PyResult, VirtualMachine}; use num_traits::ToPrimitive; - /// CArgObject - returned by byref() and paramfunc - /// tagPyCArgObject + // CArgObject - returned by byref() and paramfunc + // tagPyCArgObject #[pyclass(name = "CArgObject", module = "_ctypes", no_attr)] #[derive(Debug, PyPayload)] pub(crate) struct CArgObject { @@ -840,7 +840,7 @@ pub(crate) mod _ctypes { super::function::cast_impl(&obj, src, &ctype, vm) } - /// Python-level cast function (PYFUNCTYPE wrapper) + // Python-level cast function (PYFUNCTYPE wrapper) #[pyfunction] fn cast(obj: PyObjectRef, typ: PyObjectRef, vm: &VirtualMachine) -> PyResult { super::function::cast_impl(&obj, obj.clone(), &typ, vm) @@ -883,7 +883,7 @@ pub(crate) mod _ctypes { .into()) } - /// Unpickle a ctypes object. + // Unpickle a ctypes object. #[pyfunction] fn _unpickle(typ: PyObjectRef, state: PyObjectRef, vm: &VirtualMachine) -> PyResult { if !state.class().is(vm.ctx.types.tuple_type.as_ref()) { @@ -894,7 +894,7 @@ pub(crate) mod _ctypes { Ok(obj) } - /// Call a function at the given address with the given arguments. + // Call a function at the given address with the given arguments. #[pyfunction] fn call_function( func_addr: ArgStrictInt, @@ -905,7 +905,7 @@ pub(crate) mod _ctypes { call_function_internal(func_addr, args, 0, vm) } - /// Call a cdecl function at the given address with the given arguments. + // Call a cdecl function at the given address with the given arguments. #[pyfunction] fn call_cdeclfunction( func_addr: ArgStrictInt, @@ -952,7 +952,7 @@ pub(crate) mod _ctypes { Ok(vm.ctx.new_int(result).into()) } - /// Convert a pointer (as integer) to a Python object. + // Convert a pointer (as integer) to a Python object. #[pyfunction(name = "PyObj_FromPtr")] fn py_obj_from_ptr(ptr: ArgStrictInt, vm: &VirtualMachine) -> PyResult { let ptr = ptr.value; diff --git a/crates/vm/src/stdlib/_ctypes/array.rs b/crates/vm/src/stdlib/_ctypes/array.rs index b0d4695e9..0504688d8 100644 --- a/crates/vm/src/stdlib/_ctypes/array.rs +++ b/crates/vm/src/stdlib/_ctypes/array.rs @@ -165,7 +165,7 @@ fn create_array_type_with_name( Ok(new_type) } -/// PyCArrayType - metatype for Array types +// PyCArrayType - metatype for Array types #[pyclass(name = "PyCArrayType", base = PyType, module = "_ctypes")] #[derive(Debug)] #[repr(transparent)] diff --git a/crates/vm/src/stdlib/_ctypes/function.rs b/crates/vm/src/stdlib/_ctypes/function.rs index c16f2a7f3..ad02dc918 100644 --- a/crates/vm/src/stdlib/_ctypes/function.rs +++ b/crates/vm/src/stdlib/_ctypes/function.rs @@ -452,7 +452,7 @@ fn wstring_at_impl(ptr: usize, size: isize, vm: &VirtualMachine) -> PyResult { } } -/// A buffer wrapping raw memory at a given pointer, for zero-copy memoryview. +// A buffer wrapping raw memory at a given pointer, for zero-copy memoryview. #[pyclass(name = "_RawMemoryBuffer", module = "_ctypes")] #[derive(Debug, PyPayload)] pub(super) struct RawMemoryBuffer { @@ -1921,7 +1921,7 @@ unsafe extern "C" fn thunk_callback( }); } -/// CThunkObject wraps a Python callable to make it callable from C code. +// CThunkObject wraps a Python callable to make it callable from C code. #[pyclass(name = "CThunkObject", module = "_ctypes")] #[derive(PyPayload)] pub(super) struct PyCThunk { diff --git a/crates/vm/src/stdlib/_ctypes/pointer.rs b/crates/vm/src/stdlib/_ctypes/pointer.rs index d85f969af..6a8ebe660 100644 --- a/crates/vm/src/stdlib/_ctypes/pointer.rs +++ b/crates/vm/src/stdlib/_ctypes/pointer.rs @@ -319,7 +319,7 @@ impl PyCPointer { ); } - /// contents getter - reads address from b_ptr and creates an instance of the pointed-to type + // contents getter - reads address from b_ptr and creates an instance of the pointed-to type #[pygetset] fn contents(zelf: &Py, vm: &VirtualMachine) -> PyResult { // Pointer_get_contents @@ -343,8 +343,8 @@ impl PyCPointer { .map(Into::into) } - /// contents setter - stores address in b_ptr and keeps reference - /// Pointer_set_contents + // contents setter - stores address in b_ptr and keeps reference + // Pointer_set_contents #[pygetset(setter)] fn set_contents(zelf: &Py, value: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> { // Get stginfo and proto for type validation diff --git a/crates/vm/src/stdlib/_ctypes/simple.rs b/crates/vm/src/stdlib/_ctypes/simple.rs index a78d6db84..3eb8372b2 100644 --- a/crates/vm/src/stdlib/_ctypes/simple.rs +++ b/crates/vm/src/stdlib/_ctypes/simple.rs @@ -1238,9 +1238,9 @@ impl PyCSimple { array_type_from_ctype(cls.into(), n as usize, vm) } - /// Simple_from_outparm - convert output parameter back to Python value - /// For direct subclasses of _SimpleCData (e.g., c_int), returns the value. - /// For subclasses of those (e.g., class MyInt(c_int)), returns self. + // Simple_from_outparm - convert output parameter back to Python value + // For direct subclasses of _SimpleCData (e.g., c_int), returns the value. + // For subclasses of those (e.g., class MyInt(c_int)), returns self. #[pymethod] fn __ctypes_from_outparam__(zelf: PyRef, vm: &VirtualMachine) -> PyResult { // _ctypes_simple_instance: returns true if NOT a direct subclass of Simple_Type diff --git a/crates/vm/src/stdlib/_ctypes/structure.rs b/crates/vm/src/stdlib/_ctypes/structure.rs index 959fff41a..ed1c47a74 100644 --- a/crates/vm/src/stdlib/_ctypes/structure.rs +++ b/crates/vm/src/stdlib/_ctypes/structure.rs @@ -28,7 +28,7 @@ pub(super) fn calculate_struct_size(cls: &Py, vm: &VirtualMachine) -> Py Ok(0) } -/// PyCStructType - metaclass for Structure +// PyCStructType - metaclass for Structure #[pyclass(name = "PyCStructType", base = PyType, module = "_ctypes")] #[derive(Debug)] #[repr(transparent)] @@ -218,7 +218,7 @@ impl PyCStructType { PyCData::in_dll(cls, dll, name, vm) } - /// Called when a new Structure subclass is created + // Called when a new Structure subclass is created #[pyclassmethod] fn __init_subclass__(cls: PyTypeRef, vm: &VirtualMachine) -> PyResult<()> { cls.mark_bases_final(); diff --git a/crates/vm/src/stdlib/_ctypes/union.rs b/crates/vm/src/stdlib/_ctypes/union.rs index 2b19aa59c..ef3cdce82 100644 --- a/crates/vm/src/stdlib/_ctypes/union.rs +++ b/crates/vm/src/stdlib/_ctypes/union.rs @@ -29,7 +29,7 @@ pub(super) fn calculate_union_size(cls: &Py, vm: &VirtualMachine) -> PyR Ok(0) } -/// PyCUnionType - metaclass for Union +// PyCUnionType - metaclass for Union #[pyclass(name = "UnionType", base = PyType, module = "_ctypes")] #[derive(Debug)] #[repr(transparent)] @@ -466,7 +466,7 @@ impl PyCUnionType { PyCData::in_dll(cls, dll, name, vm) } - /// Called when a new Union subclass is created + // Called when a new Union subclass is created #[pyclassmethod] fn __init_subclass__(cls: PyTypeRef, vm: &VirtualMachine) -> PyResult<()> { cls.mark_bases_final(); diff --git a/crates/vm/src/stdlib/_interpchannels.rs b/crates/vm/src/stdlib/_interpchannels.rs index b852c410d..9cc26b027 100644 --- a/crates/vm/src/stdlib/_interpchannels.rs +++ b/crates/vm/src/stdlib/_interpchannels.rs @@ -671,7 +671,7 @@ pub(crate) mod _interpchannels { flags(BASETYPE, IMMUTABLETYPE, DISALLOW_INSTANTIATION) )] impl ChannelID { - /// `channelid_richcompare`. + // `channelid_richcompare`. #[pyslot] fn slot_richcompare( zelf: &PyObject, diff --git a/crates/vm/src/stdlib/_io.rs b/crates/vm/src/stdlib/_io.rs index 15d5b27a5..176069592 100644 --- a/crates/vm/src/stdlib/_io.rs +++ b/crates/vm/src/stdlib/_io.rs @@ -6376,7 +6376,7 @@ mod fileio { Err(vm.new_type_error(format!("cannot pickle '{}' instances", zelf.class().name()))) } - /// fileio_dealloc_warn in Modules/_io/fileio.c + // fileio_dealloc_warn in Modules/_io/fileio.c #[pymethod(name = "_dealloc_warn")] fn _dealloc_warn_method(zelf: &Py, object: PyObjectRef, vm: &VirtualMachine) { Self::dealloc_warn(zelf, &object, vm); diff --git a/crates/vm/src/stdlib/_winapi.rs b/crates/vm/src/stdlib/_winapi.rs index 2fd640be2..c8a130399 100644 --- a/crates/vm/src/stdlib/_winapi.rs +++ b/crates/vm/src/stdlib/_winapi.rs @@ -480,8 +480,8 @@ mod _winapi { vm.ctx.none() } - /// LCMapStringEx - Map a string to another string using locale-specific rules - /// This is used by ntpath.normcase() for proper Windows case conversion + // LCMapStringEx - Map a string to another string using locale-specific rules + // This is used by ntpath.normcase() for proper Windows case conversion #[pyfunction] fn LCMapStringEx( locale: PyStrRef, @@ -541,7 +541,7 @@ mod _winapi { _security_attributes: PyObjectRef, // Ignored, can be None } - /// CreateNamedPipe - Create a named pipe + // CreateNamedPipe - Create a named pipe #[pyfunction] fn CreateNamedPipe(args: CreateNamedPipeArgs, vm: &VirtualMachine) -> PyResult { let name = args @@ -694,7 +694,7 @@ mod _winapi { Ok(path_name_result_to_pystr(wide, vm)) } - /// WaitNamedPipe - Wait for an instance of a named pipe to become available. + // WaitNamedPipe - Wait for an instance of a named pipe to become available. #[pyfunction] fn WaitNamedPipe(name: PyStrRef, timeout: u32, vm: &VirtualMachine) -> PyResult<()> { let name = name @@ -704,7 +704,7 @@ mod _winapi { host_winapi::wait_named_pipe_w(&name, timeout).map_err(|e| e.to_pyexception(vm)) } - /// PeekNamedPipe - Peek at data in a named pipe without removing it. + // PeekNamedPipe - Peek at data in a named pipe without removing it. #[pyfunction] fn PeekNamedPipe( handle: WinHandle, @@ -743,7 +743,7 @@ mod _winapi { } } - /// CreateEventW - Create or open a named or unnamed event object. + // CreateEventW - Create or open a named or unnamed event object. #[pyfunction] fn CreateEventW( security_attributes: isize, // Always NULL (0) @@ -763,7 +763,7 @@ mod _winapi { .map_err(|e| e.to_pyexception(vm)) } - /// SetEvent - Set the specified event object to the signaled state. + // SetEvent - Set the specified event object to the signaled state. #[pyfunction] fn SetEvent(event: WinHandle, vm: &VirtualMachine) -> PyResult<()> { host_winapi::set_event(event.0).map_err(|e| e.to_pyexception(vm)) @@ -779,7 +779,7 @@ mod _winapi { overlapped: bool, } - /// WriteFile - Write data to a file or I/O device. + // WriteFile - Write data to a file or I/O device. #[pyfunction] fn WriteFile(args: WriteFileArgs, vm: &VirtualMachine) -> PyResult { let handle = args.handle; @@ -819,7 +819,7 @@ mod _winapi { overlapped: bool, } - /// ReadFile - Read data from a file or I/O device. + // ReadFile - Read data from a file or I/O device. #[pyfunction] fn ReadFile(args: ReadFileArgs, vm: &VirtualMachine) -> PyResult { let handle = args.handle; @@ -850,7 +850,7 @@ mod _winapi { .into()) } - /// SetNamedPipeHandleState - Set the read mode and other options of a named pipe. + // SetNamedPipeHandleState - Set the read mode and other options of a named pipe. #[pyfunction] fn SetNamedPipeHandleState( named_pipe: WinHandle, @@ -870,13 +870,13 @@ mod _winapi { .map_err(|e| e.to_pyexception(vm)) } - /// ResetEvent - Reset the specified event object to the nonsignaled state. + // ResetEvent - Reset the specified event object to the nonsignaled state. #[pyfunction] fn ResetEvent(event: WinHandle, vm: &VirtualMachine) -> PyResult<()> { host_winapi::reset_event(event.0).map_err(|e| e.to_pyexception(vm)) } - /// CreateMutexW - Create or open a named or unnamed mutex object. + // CreateMutexW - Create or open a named or unnamed mutex object. #[pyfunction] fn CreateMutexW( security_attributes: isize, @@ -894,7 +894,7 @@ mod _winapi { .map_err(|e| e.to_pyexception(vm)) } - /// OpenEventW - Open an existing named event object. + // OpenEventW - Open an existing named event object. #[pyfunction] fn OpenEventW( desired_access: u32, @@ -992,7 +992,7 @@ mod _winapi { } } - /// CreateFileMapping - Create or open a named or unnamed file mapping object. + // CreateFileMapping - Create or open a named or unnamed file mapping object. #[pyfunction] fn CreateFileMapping( file_handle: WinHandle, @@ -1018,7 +1018,7 @@ mod _winapi { .map_err(|e| e.to_pyexception(vm)) } - /// OpenFileMapping - Open a named file mapping object. + // OpenFileMapping - Open a named file mapping object. #[pyfunction] fn OpenFileMapping( desired_access: u32, @@ -1035,7 +1035,7 @@ mod _winapi { .map_err(|e| e.to_pyexception(vm)) } - /// MapViewOfFile - Map a view of a file mapping into the address space. + // MapViewOfFile - Map a view of a file mapping into the address space. #[pyfunction] fn MapViewOfFile( file_map: WinHandle, @@ -1055,13 +1055,13 @@ mod _winapi { .map_err(|e| e.to_pyexception(vm)) } - /// UnmapViewOfFile - Unmap a mapped view of a file. + // UnmapViewOfFile - Unmap a mapped view of a file. #[pyfunction] fn UnmapViewOfFile(address: isize, vm: &VirtualMachine) -> PyResult<()> { host_winapi::unmap_view_of_file(address).map_err(|e| e.to_pyexception(vm)) } - /// VirtualQuerySize - Return the size of a memory region. + // VirtualQuerySize - Return the size of a memory region. #[pyfunction] fn VirtualQuerySize(address: isize, vm: &VirtualMachine) -> PyResult { host_winapi::virtual_query_size(address).map_err(|e| e.to_pyexception(vm)) diff --git a/crates/vm/src/stdlib/gc.rs b/crates/vm/src/stdlib/gc.rs index 2ebfd7928..92679b985 100644 --- a/crates/vm/src/stdlib/gc.rs +++ b/crates/vm/src/stdlib/gc.rs @@ -258,13 +258,13 @@ mod gc { gc_state::gc_state().get_freeze_count() } - /// gc.garbage - list of uncollectable objects + // gc.garbage - list of uncollectable objects #[pyattr] fn garbage(vm: &VirtualMachine) -> PyListRef { vm.state.gc.py_garbage.clone() } - /// gc.callbacks - list of callbacks to be invoked + // gc.callbacks - list of callbacks to be invoked #[pyattr] fn callbacks(vm: &VirtualMachine) -> PyListRef { vm.state.gc.py_callbacks.clone() diff --git a/crates/wasm/src/js_module.rs b/crates/wasm/src/js_module.rs index dbd74c52d..3ea4b168b 100644 --- a/crates/wasm/src/js_module.rs +++ b/crates/wasm/src/js_module.rs @@ -259,8 +259,8 @@ mod _js { type_of(&self.value) } - /// Checks that `typeof self == "object" && self !== null`. Use instead - /// of `value.typeof() == "object"` + // Checks that `typeof self == "object" && self !== null`. Use instead + // of `value.typeof() == "object"` #[pymethod] fn is_object(&self) -> bool { self.value.is_object()