mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-23 00:35:35 +00:00
pyo3 v0.18 migration (#1173)
* pyo v0.18 migration * Fix formatting issues of black
This commit is contained in:
@ -267,12 +267,12 @@ impl PyBertNormalizer {
|
||||
}
|
||||
|
||||
#[new]
|
||||
#[args(
|
||||
clean_text = "true",
|
||||
handle_chinese_chars = "true",
|
||||
strip_accents = "None",
|
||||
lowercase = "true"
|
||||
)]
|
||||
#[pyo3(signature = (
|
||||
clean_text = true,
|
||||
handle_chinese_chars = true,
|
||||
strip_accents = None,
|
||||
lowercase = true
|
||||
))]
|
||||
fn new(
|
||||
clean_text: bool,
|
||||
handle_chinese_chars: bool,
|
||||
@ -407,7 +407,7 @@ impl PyStrip {
|
||||
}
|
||||
|
||||
#[new]
|
||||
#[args(left = "true", right = "true")]
|
||||
#[pyo3(signature = (left = true, right = true))]
|
||||
fn new(left: bool, right: bool) -> (Self, PyNormalizer) {
|
||||
(PyStrip {}, Strip::new(left, right).into())
|
||||
}
|
||||
|
Reference in New Issue
Block a user