
from typing import Union, Optional, Tuple
from pathlib import Path
from abc import ABC, abstractmethod

from sklearn_porter.enums import Method, Language, Template


class EstimatorApiABC(ABC):
    """
    An abstract interface to ensure equal methods between the
    main class `sklearn_porter.Estimator` and all subclasses
    in `sklearn-porter.estimator.*`.
    """

    @abstractmethod
    def port(
            self,
            language: Optional[Language] = None,
            template: Optional[Template] = None,
            to_json: bool = False,
            **kwargs
    ) -> Union[str, Tuple[str, str]]:
        """
        Port an estimator.

        Parameters
        ----------
        method : Method
            The required method.
        language : Language
            The required language.
        template : Template
            The required template.
        kwargs

        Returns
        -------
        The ported estimator.
        """
        pass

    @abstractmethod
    def dump(
            self,
            language: Optional[Language] = None,
            template: Optional[Template] = None,
            directory: Optional[Union[str, Path]] = None,
            to_json: bool = False,
            **kwargs
    ) -> Union[str, Tuple[str, str]]:
        """
        Dump an estimator to the filesystem.

        Parameters
        ----------
        method : Method
            The required method.
        language : Language
            The required language.
        template : Template
            The required template
        directory : str or Path
            The destination directory.
        kwargs

        Returns
        -------
        The paths to the dumped files.
        """
        pass


from typing import Union, Optional, Tuple
from pathlib import Path
from abc import ABC, abstractmethod

from sklearn_porter.enums import Language, Template


class EstimatorApiABC(ABC):
    """
    An abstract interface to ensure equal methods between the
    main class `sklearn_porter.Estimator` and all subclasses
    in `sklearn-porter.estimator.*`.
    """

    @abstractmethod
    def port(
            self,
            language: Optional[Language] = None,
            template: Optional[Template] = None,
            to_json: bool = False,
            **kwargs
    ) -> Union[str, Tuple[str, str]]:
        """
        Port an estimator.

        Parameters
        ----------
        language : Language
            The required language.
        template : Template
            The required template.
        to_json : bool (default: False)
            Return the result as JSON string.
        kwargs

        Returns
        -------
        The ported estimator.
        """

    @abstractmethod
    def dump(
            self,
            language: Optional[Language] = None,
            template: Optional[Template] = None,
            directory: Optional[Union[str, Path]] = None,
            to_json: bool = False,
            **kwargs
    ) -> Union[str, Tuple[str, str]]:
        """
        Dump an estimator to the filesystem.

        Parameters
        ----------
        language : Language
            The required language.
        template : Template
            The required template
        directory : str or Path
            The destination directory.
        to_json : bool (default: False)
            Return the result as JSON string.
        kwargs

        Returns
        -------
        The paths to the dumped files.
        """

Remove unused imports and `pass` keywords
feature/oop-api-refactoring: Remove unused imports and `pass` keywords

  
  from typing import Union, Optional, Tuple
  from pathlib import Path
  from abc import ABC, abstractmethod
  
- from sklearn_porter.enums import Method, Language, Template
+ from sklearn_porter.enums import Language, Template
  
  
  class EstimatorApiABC(ABC):
      """
      An abstract interface to ensure equal methods between the
      main class `sklearn_porter.Estimator` and all subclasses
      in `sklearn-porter.estimator.*`.
      """
  
      @abstractmethod
      def port(
              self,
              language: Optional[Language] = None,
              template: Optional[Template] = None,
              to_json: bool = False,
              **kwargs
      ) -> Union[str, Tuple[str, str]]:
          """
          Port an estimator.
  
          Parameters
          ----------
-         method : Method
-             The required method.
          language : Language
              The required language.
          template : Template
              The required template.
+         to_json : bool (default: False)
+             Return the result as JSON string.
          kwargs
  
          Returns
          -------
          The ported estimator.
          """
-         pass
  
      @abstractmethod
      def dump(
              self,
              language: Optional[Language] = None,
              template: Optional[Template] = None,
              directory: Optional[Union[str, Path]] = None,
              to_json: bool = False,
              **kwargs
      ) -> Union[str, Tuple[str, str]]:
          """
          Dump an estimator to the filesystem.
  
          Parameters
          ----------
-         method : Method
-             The required method.
          language : Language
              The required language.
          template : Template
              The required template
          directory : str or Path
              The destination directory.
+         to_json : bool (default: False)
+             Return the result as JSON string.
          kwargs
  
          Returns
          -------
          The paths to the dumped files.
          """
-         pass
  
Remove unused imports and `pass` keywords
## Code Before:

from typing import Union, Optional, Tuple
from pathlib import Path
from abc import ABC, abstractmethod

from sklearn_porter.enums import Method, Language, Template


class EstimatorApiABC(ABC):
    """
    An abstract interface to ensure equal methods between the
    main class `sklearn_porter.Estimator` and all subclasses
    in `sklearn-porter.estimator.*`.
    """

    @abstractmethod
    def port(
            self,
            language: Optional[Language] = None,
            template: Optional[Template] = None,
            to_json: bool = False,
            **kwargs
    ) -> Union[str, Tuple[str, str]]:
        """
        Port an estimator.

        Parameters
        ----------
        method : Method
            The required method.
        language : Language
            The required language.
        template : Template
            The required template.
        kwargs

        Returns
        -------
        The ported estimator.
        """
        pass

    @abstractmethod
    def dump(
            self,
            language: Optional[Language] = None,
            template: Optional[Template] = None,
            directory: Optional[Union[str, Path]] = None,
            to_json: bool = False,
            **kwargs
    ) -> Union[str, Tuple[str, str]]:
        """
        Dump an estimator to the filesystem.

        Parameters
        ----------
        method : Method
            The required method.
        language : Language
            The required language.
        template : Template
            The required template
        directory : str or Path
            The destination directory.
        kwargs

        Returns
        -------
        The paths to the dumped files.
        """
        pass

## Instruction:
Remove unused imports and `pass` keywords
## Code After:

from typing import Union, Optional, Tuple
from pathlib import Path
from abc import ABC, abstractmethod

from sklearn_porter.enums import Language, Template


class EstimatorApiABC(ABC):
    """
    An abstract interface to ensure equal methods between the
    main class `sklearn_porter.Estimator` and all subclasses
    in `sklearn-porter.estimator.*`.
    """

    @abstractmethod
    def port(
            self,
            language: Optional[Language] = None,
            template: Optional[Template] = None,
            to_json: bool = False,
            **kwargs
    ) -> Union[str, Tuple[str, str]]:
        """
        Port an estimator.

        Parameters
        ----------
        language : Language
            The required language.
        template : Template
            The required template.
        to_json : bool (default: False)
            Return the result as JSON string.
        kwargs

        Returns
        -------
        The ported estimator.
        """

    @abstractmethod
    def dump(
            self,
            language: Optional[Language] = None,
            template: Optional[Template] = None,
            directory: Optional[Union[str, Path]] = None,
            to_json: bool = False,
            **kwargs
    ) -> Union[str, Tuple[str, str]]:
        """
        Dump an estimator to the filesystem.

        Parameters
        ----------
        language : Language
            The required language.
        template : Template
            The required template
        directory : str or Path
            The destination directory.
        to_json : bool (default: False)
            Return the result as JSON string.
        kwargs

        Returns
        -------
        The paths to the dumped files.
        """
