Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Dec 27, 2024
1 parent 7acb82b commit 05d4b89
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions dev/src/generate/binding_python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ pub fn generate(project_root: PathBuf, services: &Services) -> Result<()> {
.filter(|x| enabled_service(x.0.as_str())),
);

// move required options at beginning.
for srv in &mut v {
srv.1.config = srv
.1
Expand Down Expand Up @@ -85,25 +86,15 @@ pub fn generate(project_root: PathBuf, services: &Services) -> Result<()> {
impl ConfigType {
pub fn python_type(&self) -> String {
match self {
ConfigType::Bool => {
"_bool".into()
}
ConfigType::Duration => {
"_duration".into()
}
ConfigType::Bool => "_bool".into(),
ConfigType::Duration => "_duration".into(),
ConfigType::I64
| ConfigType::Usize
| ConfigType::U64
| ConfigType::U32
| ConfigType::U16 => {
"_int".into()
}
ConfigType::Vec => {
"_strings".into()
}
ConfigType::String => {
"str".into()
}
| ConfigType::U16 => "_int".into(),
ConfigType::Vec => "_strings".into(),
ConfigType::String => "str".into(),
}
}
}

0 comments on commit 05d4b89

Please sign in to comment.