Skip to content

Commit a7dfd3f

Browse files
committed
Remove repr_rows handling in max_rows resolution in Rust
1 parent 0ad2621 commit a7dfd3f

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

src/dataframe.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -148,31 +148,12 @@ where
148148
.unwrap_or_else(|_| default_value.clone())
149149
}
150150

151-
/// Resolve the max_rows value, preferring repr_rows if it differs from the default.
152-
///
153-
/// This function handles the transition from the deprecated `repr_rows` parameter
154-
/// to the new `max_rows` parameter. It checks both attributes and uses `repr_rows`
155-
/// if it has been explicitly set to a different value than `max_rows`.
156-
fn resolve_max_rows(formatter: &Bound<'_, PyAny>, default: usize) -> usize {
157-
let max_rows = get_attr(formatter, "max_rows", default);
158-
let repr_rows = get_attr(formatter, "repr_rows", default);
159-
160-
// If repr_rows differs from the default, it was explicitly set by the user
161-
// (Python-side validation ensures only one is used, but we prefer repr_rows
162-
// for backward compatibility in case it was set)
163-
if repr_rows != default && repr_rows != max_rows {
164-
repr_rows
165-
} else {
166-
max_rows
167-
}
168-
}
169-
170151
/// Helper function to create a FormatterConfig from a Python formatter object
171152
fn build_formatter_config_from_python(formatter: &Bound<'_, PyAny>) -> PyResult<FormatterConfig> {
172153
let default_config = FormatterConfig::default();
173154
let max_bytes = get_attr(formatter, "max_memory_bytes", default_config.max_bytes);
174155
let min_rows = get_attr(formatter, "min_rows_display", default_config.min_rows);
175-
let max_rows = resolve_max_rows(formatter, default_config.max_rows);
156+
let max_rows = get_attr(formatter, "max_rows", default_config.max_rows);
176157

177158
let config = FormatterConfig {
178159
max_bytes,

0 commit comments

Comments
 (0)