(self, fullname, default=None)
| 872 | return contextlib.nullcontext() |
| 873 | |
| 874 | def try_import_attribute(self, fullname, default=None): |
| 875 | if fullname is None: |
| 876 | return default |
| 877 | assert fullname.count('.') == 1, fullname |
| 878 | module_name, attribute = fullname.split('.', maxsplit=1) |
| 879 | try: |
| 880 | module = importlib.import_module(module_name) |
| 881 | except ImportError: |
| 882 | return default |
| 883 | try: |
| 884 | return getattr(module, attribute, default) |
| 885 | except TypeError: |
| 886 | return default |
| 887 | |
| 888 | def fetch_hash_function(self, name, implementation): |
| 889 | info = hashlib_helper.get_hash_func_info(name) |
no test coverage detected