mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Add proper underscore handling to float and complex types. (#5356)
This commit is contained in:
1 parent
e42c1a33b5
commit
2335ca0f72
4 files changed
+11
-15
No files matched your search
Generated
+6
-6
@@ -2010,7 +2010,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "rustpython-ast"
|
||||
version = "0.3.1"
|
||||
source = "git+https://github.com/RustPython/Parser.git?rev=51b5f80ae3080dfec2db815a299a69873fb9ca65#51b5f80ae3080dfec2db815a299a69873fb9ca65"
|
||||
source = "git+https://github.com/RustPython/Parser.git?rev=00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655#00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655"
|
||||
dependencies = [
|
||||
"is-macro",
|
||||
"malachite-bigint",
|
||||
@@ -2123,7 +2123,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "rustpython-format"
|
||||
version = "0.3.1"
|
||||
source = "git+https://github.com/RustPython/Parser.git?rev=51b5f80ae3080dfec2db815a299a69873fb9ca65#51b5f80ae3080dfec2db815a299a69873fb9ca65"
|
||||
source = "git+https://github.com/RustPython/Parser.git?rev=00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655#00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655"
|
||||
dependencies = [
|
||||
"bitflags 2.5.0",
|
||||
"itertools 0.11.0",
|
||||
@@ -2150,7 +2150,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "rustpython-literal"
|
||||
version = "0.3.1"
|
||||
source = "git+https://github.com/RustPython/Parser.git?rev=51b5f80ae3080dfec2db815a299a69873fb9ca65#51b5f80ae3080dfec2db815a299a69873fb9ca65"
|
||||
source = "git+https://github.com/RustPython/Parser.git?rev=00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655#00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655"
|
||||
dependencies = [
|
||||
"hexf-parse",
|
||||
"is-macro",
|
||||
@@ -2162,7 +2162,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "rustpython-parser"
|
||||
version = "0.3.1"
|
||||
source = "git+https://github.com/RustPython/Parser.git?rev=51b5f80ae3080dfec2db815a299a69873fb9ca65#51b5f80ae3080dfec2db815a299a69873fb9ca65"
|
||||
source = "git+https://github.com/RustPython/Parser.git?rev=00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655#00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"is-macro",
|
||||
@@ -2185,7 +2185,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "rustpython-parser-core"
|
||||
version = "0.3.1"
|
||||
source = "git+https://github.com/RustPython/Parser.git?rev=51b5f80ae3080dfec2db815a299a69873fb9ca65#51b5f80ae3080dfec2db815a299a69873fb9ca65"
|
||||
source = "git+https://github.com/RustPython/Parser.git?rev=00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655#00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655"
|
||||
dependencies = [
|
||||
"is-macro",
|
||||
"memchr",
|
||||
@@ -2195,7 +2195,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "rustpython-parser-vendored"
|
||||
version = "0.3.1"
|
||||
source = "git+https://github.com/RustPython/Parser.git?rev=51b5f80ae3080dfec2db815a299a69873fb9ca65#51b5f80ae3080dfec2db815a299a69873fb9ca65"
|
||||
source = "git+https://github.com/RustPython/Parser.git?rev=00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655#00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"once_cell",
|
||||
|
||||
+5
-5
@@ -30,11 +30,11 @@ rustpython-stdlib = { path = "stdlib", default-features = false, version = "0.3.
|
||||
rustpython-sre_engine = { path = "vm/sre_engine", version = "0.3.1" }
|
||||
rustpython-doc = { git = "https://github.com/RustPython/__doc__", tag = "0.3.0", version = "0.3.0" }
|
||||
|
||||
rustpython-literal = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "51b5f80ae3080dfec2db815a299a69873fb9ca65" }
|
||||
rustpython-parser-core = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "51b5f80ae3080dfec2db815a299a69873fb9ca65" }
|
||||
rustpython-parser = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "51b5f80ae3080dfec2db815a299a69873fb9ca65" }
|
||||
rustpython-ast = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "51b5f80ae3080dfec2db815a299a69873fb9ca65" }
|
||||
rustpython-format = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "51b5f80ae3080dfec2db815a299a69873fb9ca65" }
|
||||
rustpython-literal = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655" }
|
||||
rustpython-parser-core = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655" }
|
||||
rustpython-parser = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655" }
|
||||
rustpython-ast = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655" }
|
||||
rustpython-format = { git = "https://github.com/RustPython/Parser.git", version = "0.3.1", rev = "00d2f1d1a7522ef9c85c10dfa5f0bb7178dee655" }
|
||||
# rustpython-literal = { path = "../RustPython-parser/literal" }
|
||||
# rustpython-parser-core = { path = "../RustPython-parser/core" }
|
||||
# rustpython-parser = { path = "../RustPython-parser/parser" }
|
||||
|
||||
Vendored
-2
@@ -576,8 +576,6 @@ class ComplexTest(unittest.TestCase):
|
||||
self.assertEqual(copysign(1., complex("-nan-nanj").real), -1.)
|
||||
self.assertEqual(copysign(1., complex("-nan-nanj").imag), -1.)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_underscores(self):
|
||||
# check underscores
|
||||
for lit in VALID_UNDERSCORE_LITERALS:
|
||||
|
||||
Vendored
-2
@@ -72,8 +72,6 @@ class GeneralFloatCases(unittest.TestCase):
|
||||
def test_noargs(self):
|
||||
self.assertEqual(float(), 0.0)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_underscores(self):
|
||||
for lit in VALID_UNDERSCORE_LITERALS:
|
||||
if not any(ch in lit for ch in 'jJxXoObB'):
|
||||
|
||||
Reference in new issue
Block a user