Skip to content

Commit

Permalink
use __getattr__ instead of __getattribute__
Browse files Browse the repository at this point in the history
  • Loading branch information
keewis committed Apr 26, 2024
1 parent 8d5ef72 commit f8e048e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hypothesis-python/tests/array_api/test_partial_adoptors.py
Expand Up @@ -38,11 +38,11 @@ def __init__(self, wrapped, *, exclude=()):
self.wrapped = wrapped
self.exclude = exclude

def __getattribute__(self, name):
def __getattr__(self, name):
if name in self.exclude:
raise AttributeError(f"removed on the mock: {name}")

return object.__getattribute__(self, name)
return object.__getattr__(self, name)


def wrap_array(func: callable, exclude: Tuple[str, ...] = ()) -> callable:
Expand Down

0 comments on commit f8e048e

Please sign in to comment.