Hello,
With this code in Pyarmor 9.1.7 :
from __future__ import annotations
import abc
from collections.abc import Iterable
import dataclasses
@dataclasses.dataclass
class DSR[T]:
input_points: Iterable[T]
sampled_points: Iterable[Iterable[T]]
class ADS[T](abc.ABC):
@abc.abstractmethod
def sample(self, input_points: Iterable[T], n: int) -> DSR[T]:
pass
class TensorDS(ADS[int]):
def sample(self, input_points: Iterable[int], n: int) -> DSR[int]:
return DSR([],[[]])
TensorDS().sample(10,10)
with
pyarmor cfg enable_trace=1 optimize=2 package_name_format="runtime" mix_argnames=0
pyarmor -d gen --mix-str --enable-jit --enable-bcc --obf-code 2 --recursive -O src -i *.py
Then python ./src/bug_pyarmor.py
I get
Traceback (most recent call last):
File "<frozen __main__>", line 3, in <module>
File "<frozen bug_pyarmor>", line 14, in <module>
File "<frozen bug_pyarmor>", line 14, in <generic parameters of ADS>
NameError: name '__assert_armored__' is not defined
Expected no traceback.
Seem to come from --obf-code 2.
Thanks you
Hello,
With this code in Pyarmor 9.1.7 :
with
Then python ./src/bug_pyarmor.py
I get
Expected no traceback.
Seem to come from --obf-code 2.
Thanks you