8000 Fix clippy lints · RustPython/RustPython@2d97503 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2d97503

Browse files
committed
Fix clippy lints
1 parent 3d263a0 commit 2d97503

File tree

2 files changed

+12
-30
lines changed

2 files changed

+12
-30
lines changed

vm/src/frame.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,6 @@ impl ExecutingFrame<'_> {
11891189
}
11901190
bytecode::Instruction::TypeAlias => {
11911191
let name = self.pop_value();
1192-
let x = self.state.stack.last();
11931192
let type_params: PyTupleRef = self
11941193
.pop_value()
11951194
.downcast()

vm/src/stdlib/typing.rs

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,26 @@ pub(crate) use _typing::make_module;
22

33
#[pymodule]
44
pub(crate) mod _typing {
5-
use std::cell::Cell;
6-
75
use crate::{
8-
atomic_func,
9-
builtins::{
10-
pystr::AsPyStr, PyFrozenSet, PyGenericAlias, PyStr, PyTuple, PyTupleRef, PyType,
11-
PyTypeRef,
12-
},
13-
class::PyClassImpl,
14-
common::hash,
15-
convert::{ToPyObject, ToPyResult},
16-
function::PyComparisonValue,
17-
function::{Either, FuncArgs, IntoFuncArgs, OptionalArg},
18-
protocol::{PyMappingMethods, PyNumberMethods},
19-
types::PyStructSequence,
20-
types::{
21-
AsMapping, AsNumber, Comparable, GetAttr, Hashable, PyComparisonOp, Representable,
22-
},
23-
AsObject, Context, Py, PyObject, PyObjectRef, PyPayload, PyRef, PyResult, TryFromObject,
24-
VirtualMachine,
6+
builtins::{pystr::AsPyStr, PyGenericAlias, PyTupleRef, PyTypeRef},
7+
function::IntoFuncArgs,
8+
PyObjectRef, PyPayload, PyResult, VirtualMachine,
259
};
26-
use once_cell::sync::Lazy;
2710

28-
pub(crate) fn call_typing_func_object<'a>(
29-
vm: &VirtualMachine,
30-
func_name: impl AsPyStr<'a>,
31-
args: impl IntoFuncArgs,
11+
pub(crate) fn _call_typing_func_object<'a>(
12+
_vm: &VirtualMachine,
13+
_func_name: impl AsPyStr<'a>,
14+
_args: impl IntoFuncArgs,
3215
) -> PyResult {
3316
todo!("does this work????");
34-
let module = vm.import("typing", 0)?;
17+
// let module = vm.import("typing", 0)?;
3518
// let module = vm.import("_pycodecs", None, 0)?;
36-
let func = module.get_attr(func_name, vm)?;
37-
func.call(args, vm)
19+
// let func = module.get_attr(func_name, vm)?;
20+
// func.call(args, vm)
3821
}
3922

4023
#[pyattr]
41-
pub(crate) fn _idfunc(vm: &VirtualMachine) {}
24+
pub(crate) fn _idfunc(_vm: &VirtualMachine) {}
4225

4326
#[pyattr]
4427
#[pyclass(name = "TypeVar")]
@@ -56,7 +39,7 @@ pub(crate) mod _typing {
5639
}
5740
#[pyclass(flags(BASETYPE))]
5841
impl TypeVar {
59-
pub(crate) fn bound(&self, vm: &VirtualMachine) -> PyResult {
42+
pub(crate) fn _bound(&self, vm: &VirtualMachine) -> PyResult {
6043
let mut bound = self.bound.lock();
6144
if !vm.is_none(&bound) {
6245
return Ok(bound.clone());

0 commit comments

Comments
 (0)
0