not print warning when found *.py

This commit is contained in:
lyon 2022-05-05 15:20:30 +08:00
parent 833036d435
commit a725a4c0f5
3 changed files with 13 additions and 4 deletions

View File

@ -1,6 +1,7 @@
import Arm2D
import PikaStdLib
import ctypes
import module
line = Arm2D.Line()
res = line.on()

View File

View File

@ -85,10 +85,18 @@ impl Compiler {
let mut file = match file {
Ok(file) => file,
Err(_) => {
println!(
" [warning]: file: '{}{}.pyi' no found",
self.source_path, file_name
);
/* if *.py exits, not print warning */
let file_py = Compiler::open_file(format!("{}{}.py", self.source_path, file_name));
match file_py {
Ok(file) => file,
Err(_) => {
println!(
" [warning]: file: '{}{}.pyi' no found",
self.source_path, file_name
);
return self;
}
};
return self;
}
};