fix pyright issues outside of vars
This commit is contained in:
parent
9d7e353ed3
commit
3cdd2097b6
@ -823,7 +823,7 @@ class ShikiHighLevelCodeBlock(ShikiCodeBlock):
|
||||
if isinstance(code, Var):
|
||||
return string_replace_operation(
|
||||
code, StringVar(_js_expr=f"/{regex_pattern}/g", _var_type=str), ""
|
||||
)
|
||||
).guess_type()
|
||||
if isinstance(code, str):
|
||||
return re.sub(regex_pattern, "", code)
|
||||
|
||||
|
@ -359,7 +359,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
|
||||
Returns:
|
||||
The number negation operation.
|
||||
"""
|
||||
return number_negate_operation(self)
|
||||
return number_negate_operation(self).guess_type()
|
||||
|
||||
def __invert__(self):
|
||||
"""Boolean NOT the number.
|
||||
@ -383,7 +383,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
|
||||
Returns:
|
||||
The number round operation.
|
||||
"""
|
||||
return number_round_operation(self)
|
||||
return number_round_operation(self).guess_type()
|
||||
|
||||
def __ceil__(self):
|
||||
"""Ceil the number.
|
||||
@ -391,7 +391,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
|
||||
Returns:
|
||||
The number ceil operation.
|
||||
"""
|
||||
return number_ceil_operation(self)
|
||||
return number_ceil_operation(self).guess_type()
|
||||
|
||||
def __floor__(self):
|
||||
"""Floor the number.
|
||||
@ -399,7 +399,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
|
||||
Returns:
|
||||
The number floor operation.
|
||||
"""
|
||||
return number_floor_operation(self)
|
||||
return number_floor_operation(self).guess_type()
|
||||
|
||||
def __trunc__(self):
|
||||
"""Trunc the number.
|
||||
@ -407,7 +407,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
|
||||
Returns:
|
||||
The number trunc operation.
|
||||
"""
|
||||
return number_trunc_operation(self)
|
||||
return number_trunc_operation(self).guess_type()
|
||||
|
||||
@overload
|
||||
def __lt__(self, other: number_types) -> BooleanVar: ...
|
||||
|
Loading…
Reference in New Issue
Block a user