From 4a78fd77893cbb0eb6bd261557fd1eaa20689972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=B6=E5=A1=9A=E5=A4=AA=E6=99=BA?= Date: Sat, 27 Jul 2024 01:07:01 +0900 Subject: [PATCH] Refactoring library import code --- src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8b1efbf..4fd3d8a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,7 @@ -use pyo3::prelude::*; +use pyo3::{prelude::Python, prepare_freethreaded_python}; +use sila_transpiler_infrastructure::{transpile_python, Block, Expr, Instruction, Operator, Type}; use std::{env, fs::File, io::read_to_string}; -use sila_transpiler_infrastructure::*; - fn main() { let args = env::args().collect::>(); if args.len() > 2 { @@ -11,7 +10,7 @@ fn main() { .unwrap(), ); if args[1] == "run" { - pyo3::prepare_freethreaded_python(); + prepare_freethreaded_python(); Python::with_gil(|py| { py.run_bound(&transpile_python(ast), None, None) .expect("チノちゃん「うるさいですね...」");