mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Correct typo of types manually created (#3397)
* Correct typo of types manually created * Apply `cargo fmt`
This commit is contained in:
1 parent
5f158f2c6f
commit
d2a247eeca
3 files changed
+13
-9
No files matched your search
+1
-1
@@ -32,7 +32,7 @@ mod _csv {
|
||||
|
||||
#[pyattr(name = "Error")]
|
||||
fn error(vm: &VirtualMachine) -> PyTypeRef {
|
||||
PyType::new_simple_ref("Error", &vm.ctx.exceptions.exception_type).unwrap()
|
||||
PyType::new_simple_ref("_csv.Error", &vm.ctx.exceptions.exception_type).unwrap()
|
||||
}
|
||||
|
||||
#[pyfunction]
|
||||
|
||||
+11
-7
@@ -181,7 +181,7 @@ mod _ssl {
|
||||
}
|
||||
ERROR
|
||||
.get_or_init(|| {
|
||||
PyType::new_simple_ref("SSLError", &vm.ctx.exceptions.os_error).unwrap()
|
||||
PyType::new_simple_ref("ssl.SSLError", &vm.ctx.exceptions.os_error).unwrap()
|
||||
})
|
||||
.clone()
|
||||
}
|
||||
@@ -195,7 +195,7 @@ mod _ssl {
|
||||
.get_or_init(|| {
|
||||
let ssl_error = ssl_error(vm);
|
||||
PyType::new_ref(
|
||||
"SSLCertVerificationError",
|
||||
"ssl.SSLCertVerificationError",
|
||||
vec![ssl_error, vm.ctx.exceptions.value_error.clone()],
|
||||
Default::default(),
|
||||
PyBaseException::make_slots(),
|
||||
@@ -212,7 +212,9 @@ mod _ssl {
|
||||
static ERROR: PyTypeRef;
|
||||
}
|
||||
ERROR
|
||||
.get_or_init(|| PyType::new_simple_ref("SSLZeroReturnError", &ssl_error(vm)).unwrap())
|
||||
.get_or_init(|| {
|
||||
PyType::new_simple_ref("ssl.SSLZeroReturnError", &ssl_error(vm)).unwrap()
|
||||
})
|
||||
.clone()
|
||||
}
|
||||
|
||||
@@ -222,7 +224,7 @@ mod _ssl {
|
||||
static ERROR: PyTypeRef;
|
||||
}
|
||||
ERROR
|
||||
.get_or_init(|| PyType::new_simple_ref("SSLWantReadError", &ssl_error(vm)).unwrap())
|
||||
.get_or_init(|| PyType::new_simple_ref("ssl.SSLWantReadError", &ssl_error(vm)).unwrap())
|
||||
.clone()
|
||||
}
|
||||
|
||||
@@ -232,7 +234,9 @@ mod _ssl {
|
||||
static ERROR: PyTypeRef;
|
||||
}
|
||||
ERROR
|
||||
.get_or_init(|| PyType::new_simple_ref("SSLWantWriteError", &ssl_error(vm)).unwrap())
|
||||
.get_or_init(|| {
|
||||
PyType::new_simple_ref("ssl.SSLWantWriteError", &ssl_error(vm)).unwrap()
|
||||
})
|
||||
.clone()
|
||||
}
|
||||
|
||||
@@ -242,7 +246,7 @@ mod _ssl {
|
||||
static ERROR: PyTypeRef;
|
||||
}
|
||||
ERROR
|
||||
.get_or_init(|| PyType::new_simple_ref("SSLSyscallError", &ssl_error(vm)).unwrap())
|
||||
.get_or_init(|| PyType::new_simple_ref("ssl.SSLSyscallError", &ssl_error(vm)).unwrap())
|
||||
.clone()
|
||||
}
|
||||
|
||||
@@ -252,7 +256,7 @@ mod _ssl {
|
||||
static ERROR: PyTypeRef;
|
||||
}
|
||||
ERROR
|
||||
.get_or_init(|| PyType::new_simple_ref("SSLEOFError", &ssl_error(vm)).unwrap())
|
||||
.get_or_init(|| PyType::new_simple_ref("ssl.SSLEOFError", &ssl_error(vm)).unwrap())
|
||||
.clone()
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ mod zlib {
|
||||
|
||||
#[pyattr]
|
||||
fn error(vm: &VirtualMachine) -> PyTypeRef {
|
||||
PyType::new_simple_ref("error", &vm.ctx.exceptions.exception_type).unwrap()
|
||||
PyType::new_simple_ref("zlib.error", &vm.ctx.exceptions.exception_type).unwrap()
|
||||
}
|
||||
|
||||
/// Compute an Adler-32 checksum of data.
|
||||
|
||||
Reference in new issue
Block a user