Adds missing module_specs for usages of _LazyModule (#15230)
* Add missing __spec__ for transformers.models.auto * Moves the __spec__-test to the UnitTest class * Adds module_spec to all instances of _LazyModule * Refactors an old test from pytest to unittest
This commit is contained in:
@@ -210,4 +210,4 @@ if TYPE_CHECKING:
|
||||
else:
|
||||
import sys
|
||||
|
||||
sys.modules[__name__] = _LazyModule(__name__, globals()["__file__"], _import_structure)
|
||||
sys.modules[__name__] = _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)
|
||||
|
||||
Reference in New Issue
Block a user