pyconfs/_util.py
def _import_package(self) -> None:
        """Import the underlying package.

        Give proper error message if package is not available
        """
        try:
            return importlib.import_module(self._package_name)
        except ImportError as err:
            msg = f"Could not import {self._package_name!r}."
            pip_name = self._pip_names.get(self._package_name)
            if pip_name:
                py = pathlib.Path(sys.executable).name
                msg += f" Install it using '{py} -m pip install {pip_name}'"

            raise err.__class__(msg) from None
Import the underlying package.

        Give proper error message if package is not available
        
Import the underlying package.
Give proper error message if package is not available
Import the underlying package . Give proper error message if package is not available
def _import_package(self) -> None:
        try:
            return importlib.import_module(self._package_name)
        except ImportError as err:
            msg = f"Could not import {self._package_name!r}."
            pip_name = self._pip_names.get(self._package_name)
            if pip_name:
                py = pathlib.Path(sys.executable).name
                msg += f" Install it using '{py} -m pip install {pip_name}'"
            raise err.__class__(msg) from None
def _import_package ( self ) -> None : try : return importlib . import_module ( self . _package_name ) except ImportError as err : msg = f"Could not import {self._package_name!r}." pip_name = self . _pip_names . get ( self . _package_name ) if pip_name : py = pathlib . Path ( sys . executable ) . name msg += f" Install it using '{py} -m pip install {pip_name}'" raise err . __class__ ( msg ) from None
Import the underlying package.
Import the underlying package .
"""Import the underlying package.

        Give proper error message if package is not available
        """
self