We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cb4735 commit d6dbb08Copy full SHA for d6dbb08
tests/utils/matchers/meta.py
@@ -71,6 +71,13 @@ def setter(value):
71
msg = f"{type(self).__name__} object has no attribute {name}"
72
raise AttributeError(msg)
73
74
+ def __dir__(self):
75
+ dynamic_methods = []
76
+ for field_name in self.__domain_class__.__annotations__:
77
+ method_base = field_name.rstrip("_") if field_name in {"id", "type"} else field_name
78
+ dynamic_methods.extend([f"with_{method_base}", f"and_{method_base}"])
79
+ return list(super().__dir__()) + dynamic_methods
80
+
81
@staticmethod
82
def append_matcher_description(field_matcher: Matcher[Any], field_name: str, description: Description) -> None:
83
if not isinstance(field_matcher, IsAnything):
0 commit comments