Skip to content

Commit

Permalink
fix: clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mtshiba committed Oct 19, 2024
1 parent 96a1a03 commit 64169a3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 1 addition & 3 deletions crates/py2erg/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 2 additions & 0 deletions crates/pylyzer_core/analyze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ impl PythonAnalyzer {
New::new(cfg)
}

#[allow(clippy::result_large_err)]
fn check(
&mut self,
erg_ast: AST,
Expand Down Expand Up @@ -256,6 +257,7 @@ impl PythonAnalyzer {
}
}

#[allow(clippy::result_large_err)]
pub fn analyze(
&mut self,
py_code: String,
Expand Down
1 change: 1 addition & 0 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down

0 comments on commit 64169a3

Please sign in to comment.