From 9b9be7fb2c725c880630fe79590ad2b58b5a895d Mon Sep 17 00:00:00 2001 From: Shunsuke Shibayama Date: Mon, 19 Feb 2024 02:49:10 +0900 Subject: [PATCH] Update _erg_bytes.py --- crates/erg_compiler/lib/core/_erg_bytes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/erg_compiler/lib/core/_erg_bytes.py b/crates/erg_compiler/lib/core/_erg_bytes.py index fa7201677..fedb68f34 100644 --- a/crates/erg_compiler/lib/core/_erg_bytes.py +++ b/crates/erg_compiler/lib/core/_erg_bytes.py @@ -1,3 +1,6 @@ +from _erg_result import Error +from _erg_range import Range + class Bytes(bytes): def try_new(b): # -> Result[Nat] if isinstance(b, bytes): @@ -6,7 +9,6 @@ def try_new(b): # -> Result[Nat] return Error("not a bytes") def __getitem__(self, index_or_slice): - from _erg_range import Range if isinstance(index_or_slice, slice): return Bytes(bytes.__getitem__(self, index_or_slice)) elif isinstance(index_or_slice, Range):