mirror of https://github.com/mtshiba/pylyzer
fix: clippy warnings
This commit is contained in:
parent
96a1a03d9f
commit
64169a3962
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)),
|
||||
|
|
|
|||
Loading…
Reference in New Issue