Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Auto-format: cargo fmt --all
  • Loading branch information
github-actions[bot] committed Feb 11, 2026
commit 35c66f411e4be9b61fbe5c237f52070f33b2573e
2 changes: 1 addition & 1 deletion crates/stdlib/src/csv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ mod _csv {
use csv_core::Terminator;
use itertools::{self, Itertools};
use parking_lot::Mutex;
use rustpython_common::lock::LazyLock;
use rustpython_vm::match_class;
use std::collections::HashMap;
use rustpython_common::lock::LazyLock;

#[pyattr]
const QUOTE_MINIMAL: i32 = QuoteStyle::Minimal as i32;
Expand Down
3 changes: 2 additions & 1 deletion crates/stdlib/src/ssl/oid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ impl OidTable {
}

/// Global OID table
static OID_TABLE: rustpython_common::lock::LazyLock<OidTable> = rustpython_common::lock::LazyLock::new(OidTable::build);
static OID_TABLE: rustpython_common::lock::LazyLock<OidTable> =
rustpython_common::lock::LazyLock::new(OidTable::build);

/// Macro to define OID entry using oid-registry constant
macro_rules! oid_static {
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/builtins/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use super::{
PositionIterInternal, PyDictRef, PyGenericAlias, PyIntRef, PyStrRef, PyTuple, PyTupleRef,
PyType, PyTypeRef, iter::builtins_iter,
};
use crate::common::lock::LazyLock;
use crate::{
AsObject, Context, Py, PyObject, PyObjectRef, PyPayload, PyRef, PyResult,
TryFromBorrowedObject, TryFromObject, VirtualMachine,
Expand Down Expand Up @@ -30,7 +31,6 @@ use crate::{
};
use bstr::ByteSlice;
use core::{mem::size_of, ops::Deref};
use crate::common::lock::LazyLock;

#[pyclass(module = false, name = "bytes")]
#[derive(Clone, Debug)]
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/builtins/dict.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use super::{
IterStatus, PositionIterInternal, PyBaseExceptionRef, PyGenericAlias, PyMappingProxy, PySet,
PyStr, PyStrRef, PyTupleRef, PyType, PyTypeRef, set::PySetInner,
};
use crate::common::lock::LazyLock;
use crate::object::{Traverse, TraverseFn};
use crate::{
AsObject, Context, Py, PyObject, PyObjectRef, PyPayload, PyRef, PyRefExact, PyResult,
Expand All @@ -26,7 +27,6 @@ use crate::{
};
use alloc::fmt;
use rustpython_common::lock::PyMutex;
use crate::common::lock::LazyLock;

pub type DictContentType = dict_inner::Dict;

Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/builtins/mappingproxy.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use super::{PyDict, PyDictRef, PyGenericAlias, PyList, PyTuple, PyType, PyTypeRef};
use crate::common::lock::LazyLock;
use crate::{
AsObject, Context, Py, PyObject, PyObjectRef, PyPayload, PyRef, PyResult, VirtualMachine,
atomic_func,
Expand All @@ -13,7 +14,6 @@ use crate::{
PyComparisonOp, Representable,
},
};
use crate::common::lock::LazyLock;

#[pyclass(module = false, name = "mappingproxy", traverse)]
#[derive(Debug)]
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/builtins/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use super::{
PositionIterInternal, PyBytes, PyBytesRef, PyGenericAlias, PyInt, PyListRef, PySlice, PyStr,
PyStrRef, PyTuple, PyTupleRef, PyType, PyTypeRef, iter::builtins_iter,
};
use crate::common::lock::LazyLock;
use crate::{
AsObject, Context, Py, PyObject, PyObjectRef, PyPayload, PyRef, PyResult,
TryFromBorrowedObject, TryFromObject, VirtualMachine, atomic_func,
Expand Down Expand Up @@ -30,7 +31,6 @@ use core::{cmp::Ordering, fmt::Debug, mem::ManuallyDrop, ops::Range};
use crossbeam_utils::atomic::AtomicCell;
use itertools::Itertools;
use rustpython_common::lock::PyMutex;
use crate::common::lock::LazyLock;

#[derive(FromArgs)]
pub struct PyMemoryViewNewArgs {
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/builtins/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use super::{
PyGenericAlias, PyInt, PyIntRef, PySlice, PyTupleRef, PyType, PyTypeRef, builtins_iter,
tuple::tuple_hash,
};
use crate::common::lock::LazyLock;
use crate::{
AsObject, Context, Py, PyObject, PyObjectRef, PyPayload, PyRef, PyResult, TryFromObject,
VirtualMachine, atomic_func,
Expand All @@ -19,7 +20,6 @@ use crossbeam_utils::atomic::AtomicCell;
use malachite_bigint::{BigInt, Sign};
use num_integer::Integer;
use num_traits::{One, Signed, ToPrimitive, Zero};
use crate::common::lock::LazyLock;

// Search flag passed to iter_search
enum SearchType {
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/builtins/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use super::{
IterStatus, PositionIterInternal, PyDict, PyDictRef, PyGenericAlias, PyTupleRef, PyType,
PyTypeRef, builtins_iter,
};
use crate::common::lock::LazyLock;
use crate::{
AsObject, Context, Py, PyObject, PyObjectRef, PyPayload, PyRef, PyResult, TryFromObject,
atomic_func,
Expand All @@ -30,7 +31,6 @@ use rustpython_common::{
atomic::{Ordering, PyAtomic, Radium},
hash,
};
use crate::common::lock::LazyLock;

pub type SetContentType = dict_inner::Dict<()>;

Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/builtins/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use super::{
builtins_iter,
},
};
use crate::common::lock::LazyLock;
use crate::{
AsObject, Context, Py, PyExact, PyObject, PyObjectRef, PyPayload, PyRef, PyRefExact, PyResult,
TryFromBorrowedObject, VirtualMachine,
Expand Down Expand Up @@ -42,7 +43,6 @@ use rustpython_common::{
str::DeduceStrKind,
wtf8::{CodePoint, Wtf8, Wtf8Buf, Wtf8Chunk},
};
use crate::common::lock::LazyLock;
use unic_ucd_bidi::BidiClass;
use unic_ucd_category::GeneralCategory;
use unic_ucd_ident::{is_xid_continue, is_xid_start};
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/builtins/template.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use super::{PyStr, PyTupleRef, PyType};
use crate::common::lock::LazyLock;
use crate::{
AsObject, Context, Py, PyObject, PyObjectRef, PyPayload, PyRef, PyResult, VirtualMachine,
atomic_func,
Expand All @@ -10,7 +11,6 @@ use crate::{
SelfIter,
},
};
use crate::common::lock::LazyLock;

use super::interpolation::PyInterpolation;

Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/builtins/tuple.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use super::{
PositionIterInternal, PyGenericAlias, PyStrRef, PyType, PyTypeRef, iter::builtins_iter,
};
use crate::common::lock::LazyLock;
use crate::common::{
hash::{PyHash, PyUHash},
lock::PyMutex,
Expand All @@ -25,7 +26,6 @@ use crate::{
vm::VirtualMachine,
};
use alloc::fmt;
use crate::common::lock::LazyLock;

#[pyclass(module = false, name = "tuple", traverse = "manual")]
pub struct PyTuple<R = PyObjectRef> {
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/builtins/union.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use super::{genericalias, type_};
use crate::common::lock::LazyLock;
use crate::{
AsObject, Context, Py, PyObject, PyObjectRef, PyPayload, PyRef, PyResult, VirtualMachine,
atomic_func,
Expand All @@ -12,7 +13,6 @@ use crate::{
types::{AsMapping, AsNumber, Comparable, GetAttr, Hashable, PyComparisonOp, Representable},
};
use alloc::fmt;
use crate::common::lock::LazyLock;

const CLS_ATTRS: &[&str] = &["__module__"];

Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/builtins/weakproxy.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use super::{PyStr, PyStrRef, PyType, PyTypeRef, PyWeak};
use crate::common::lock::LazyLock;
use crate::{
Context, Py, PyObject, PyObjectRef, PyPayload, PyRef, PyResult, VirtualMachine, atomic_func,
class::PyClassImpl,
Expand All @@ -11,7 +12,6 @@ use crate::{
Iterable, PyComparisonOp, Representable, SetAttr,
},
};
use crate::common::lock::LazyLock;

#[pyclass(module = false, name = "weakproxy", unhashable = true, traverse)]
#[derive(Debug)]
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/stdlib/typing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ pub fn call_typing_func_object<'a>(

#[pymodule(name = "_typing", with(super::typevar::typevar))]
pub(crate) mod decl {
use crate::common::lock::LazyLock;
use crate::{
AsObject, Py, PyObjectRef, PyPayload, PyRef, PyResult, VirtualMachine, atomic_func,
builtins::{PyGenericAlias, PyStrRef, PyTuple, PyTupleRef, PyType, PyTypeRef, type_},
function::FuncArgs,
protocol::{PyMappingMethods, PyNumberMethods},
types::{AsMapping, AsNumber, Constructor, Iterable, Representable},
};
use crate::common::lock::LazyLock;

#[pyfunction]
pub(crate) fn _idfunc(args: FuncArgs, _vm: &VirtualMachine) -> PyObjectRef {
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/types/structseq.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::common::lock::LazyLock;
use crate::{
AsObject, Py, PyObject, PyObjectRef, PyPayload, PyRef, PyResult, VirtualMachine, atomic_func,
builtins::{PyBaseExceptionRef, PyStrRef, PyTuple, PyTupleRef, PyType, PyTypeRef},
Expand All @@ -9,7 +10,6 @@ use crate::{
types::PyComparisonOp,
vm::Context,
};
use crate::common::lock::LazyLock;

const DEFAULT_STRUCTSEQ_REDUCE: PyMethodDef = PyMethodDef::new_const(
"__reduce__",
Expand Down
Loading