forked from Rust-related/RustPython
Mark version 3.13.0 (#5495)
* bump to 3.13.1 * fix some tests * strip left whitespace from doc * remove specific difflib test that was causing issues * fix test_enum Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
This commit is contained in:
@@ -1125,33 +1125,7 @@ impl PyStr {
|
||||
|
||||
#[pymethod]
|
||||
fn expandtabs(&self, args: anystr::ExpandTabsArgs) -> String {
|
||||
let tab_stop = args.tabsize();
|
||||
let mut expanded_str = String::with_capacity(self.byte_len());
|
||||
let mut tab_size = tab_stop;
|
||||
let mut col_count = 0usize;
|
||||
for ch in self.as_str().chars() {
|
||||
match ch {
|
||||
'\t' => {
|
||||
let num_spaces = tab_size - col_count;
|
||||
col_count += num_spaces;
|
||||
let expand = " ".repeat(num_spaces);
|
||||
expanded_str.push_str(&expand);
|
||||
}
|
||||
'\r' | '\n' => {
|
||||
expanded_str.push(ch);
|
||||
col_count = 0;
|
||||
tab_size = 0;
|
||||
}
|
||||
_ => {
|
||||
expanded_str.push(ch);
|
||||
col_count += 1;
|
||||
}
|
||||
}
|
||||
if col_count >= tab_size {
|
||||
tab_size += tab_stop;
|
||||
}
|
||||
}
|
||||
expanded_str
|
||||
rustpython_common::str::expandtabs(self.as_str(), args.tabsize())
|
||||
}
|
||||
|
||||
#[pymethod]
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
use chrono::{prelude::DateTime, Local};
|
||||
use std::time::{Duration, UNIX_EPOCH};
|
||||
|
||||
// = 3.12.0alpha
|
||||
// = 3.13.0alpha
|
||||
pub const MAJOR: usize = 3;
|
||||
pub const MINOR: usize = 12;
|
||||
pub const MINOR: usize = 13;
|
||||
pub const MICRO: usize = 0;
|
||||
pub const RELEASELEVEL: &str = "alpha";
|
||||
pub const RELEASELEVEL_N: usize = 0xA;
|
||||
|
||||
Reference in New Issue
Block a user