mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-02 21:44:34 +00:00
Merge branch 'main' into torch_d
This commit is contained in:
commit
44e3d6f343
10 changed files with 96 additions and 72 deletions
|
@ -228,7 +228,12 @@ pub struct PyCodeGenerator {
|
|||
impl PyCodeGenerator {
|
||||
pub fn new(cfg: ErgConfig) -> Self {
|
||||
Self {
|
||||
py_version: cfg.target_version.unwrap_or_else(env_python_version),
|
||||
py_version: cfg.target_version.unwrap_or_else(|| {
|
||||
let Some(version) = env_python_version() else {
|
||||
panic!("Failed to get python version");
|
||||
};
|
||||
version
|
||||
}),
|
||||
cfg,
|
||||
str_cache: CacheSet::new(),
|
||||
prelude_loaded: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue