908 "either extensions or filter_func can be passed, but not both"
909 )
910
911 def filter_func(x: str) -> bool: 912 return "." in x and x.rsplit(".", 1)[1] in extensions # type: ignore
913
914 if filter_func is not None:
1415
1416 if pass_arg == "environment":
1417
1418 def finalize(value: t.Any) -> t.Any:1419 return default(env_finalize(self.environment, value))
1420
1421 self._finalize = self._FinalizeInfo(finalize, src)
1407
1408 if pass_arg is None:
1409
1410 def finalize(value: t.Any) -> t.Any:1411 return default(env_finalize(value))
1412
1413 else:
A function, method or class is being redefined in the same scope. This would override the original definition, and doing this is strongly discouraged. Please verify that this is something that you intended to do. Redefining anything can lead to confusion, decreases code readability and may cause bugs that are difficult to diagnose. It is recommended either to refactor the function/method/class, or choose different names.
def calc(x, y):
return x + y
def calc(x, y):
return x * y
def calc_sum(x, y):
return x + y
def calc_product(x, y):
return x * y