shairubin / fun_with_ast

let's have fun manipulating ASTs in Python
Apache License 2.0
0 stars 1 forks source link

raise fails to match #243

Open shairubin opened 4 months ago

shairubin commented 4 months ago

def modify_low_high() -> Tuple[float, float]: if any(isinstance(value, float) and math.isnan(value) for value in [low, high]): raise ValueError( f"low and high cannot be NaN, but got {low=} and {high=}" )

shairubin commented 4 months ago

this is the test that fails to match def testJstr3(self): string = """f"{high=}" """ node = GetNodeFromInput(string) self._verify_match(node, string)

shairubin commented 4 months ago

def str(self) -> str: return f"{self.kernel_name=}, {self.source_file=}, {self.hash_key=}"