Skip to content

Commit

Permalink
woopsie
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Jan 15, 2025
1 parent eb96124 commit 20354d4
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions crates/build/re_types_builder/src/codegen/python/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2416,32 +2416,7 @@ fn quote_init_method(
let parameters = compute_init_parameters(obj, objects);
let head = format!("def __init__(self: Any, {}):", parameters.join(", "));

let parameter_docs = if obj.is_union() {
Vec::new()
} else {
obj.fields
.iter()
.filter_map(|field| {
let doc_content = field.docs.lines_for(reporter, objects, Target::Python);
if doc_content.is_empty() {
if !field.is_testing() && obj.fields.len() > 1 {
reporter.error(
&field.virtpath,
&field.fqname,
format!("Field {} is missing documentation", field.name),
);
}
None
} else {
Some(format!(
"{}:\n {}",
field.name,
doc_content.join("\n ")
))
}
})
.collect::<Vec<_>>()
};
let parameter_docs = compute_init_parameter_docs(reporter, obj, objects);
let mut doc_string_lines = vec![format!(
"Create a new instance of the {} {}.",
obj.name,
Expand Down

0 comments on commit 20354d4

Please sign in to comment.