fix: clippy warnings

This commit is contained in:
Shunsuke Shibayama 2024-10-19 15:15:58 +09:00
parent 96a1a03d9f
commit 64169a3962
3 changed files with 4 additions and 3 deletions

View File

@ -436,9 +436,7 @@ impl PyiTypeStorage {
return;
};
let mut locator = RandomLocator::new(&code);
let Ok(py_program) = locator.fold(py_program) else {
return;
};
let Ok(py_program) = locator.fold(py_program);
for stmt in py_program.body {
match stmt {
py_ast::Stmt::AnnAssign(assign) => {

View File

@ -224,6 +224,7 @@ impl PythonAnalyzer {
New::new(cfg)
}
#[allow(clippy::result_large_err)]
fn check(
&mut self,
erg_ast: AST,
@ -256,6 +257,7 @@ impl PythonAnalyzer {
}
}
#[allow(clippy::result_large_err)]
pub fn analyze(
&mut self,
py_code: String,

View File

@ -6,6 +6,7 @@ use erg_common::spawn::exec_new_thread;
use erg_compiler::artifact::{CompleteArtifact, IncompleteArtifact};
use pylyzer_core::PythonAnalyzer;
#[allow(clippy::result_large_err)]
pub fn exec_analyzer(file_path: &'static str) -> Result<CompleteArtifact, IncompleteArtifact> {
let cfg = ErgConfig {
input: Input::file(PathBuf::from(file_path)),