Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
global OpenWrapper
OpenWrapper = open
return OpenWrapper
- raise AttributeError(name)
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
# In normal operation, both `UnsupportedOperation`s should be bound to the
ThreadPoolExecutor = te
return te
- raise AttributeError(f"module {__name__} has no attribute {name}")
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
global OpenWrapper
OpenWrapper = open
return OpenWrapper
- raise AttributeError(name)
+ raise AttributeError("module {__name__!r} has no attribute {name!r}")
# Pretend this exception was created here.
--- /dev/null
+Make various module ``__getattr__`` AttributeErrors more closely match a typical AttributeError