Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
JochenSiegWork committed Nov 20, 2024
1 parent 6e405b0 commit b3e79ee
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 11 additions & 3 deletions molpipeline/mol2any/mol2concatinated_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ def _set_element_execution_details(
else:
self._output_type = "mixed"
self._requires_fitting = any(
element[1]._requires_fitting for element in element_list # type: ignore[protected-access]
element[1]._requires_fitting
for element in element_list # pylint: disable=protected-access
)

def get_params(self, deep: bool = True) -> dict[str, Any]:
Expand Down Expand Up @@ -204,13 +205,20 @@ def _set_element_list(
Parameters
----------
element_list: list[tuple[str, MolToAnyPipelineElement]]
List of pipeline elements.
parameter_copy: dict[str, Any]
Copy of parameters.
parameters: Any
Original parameters.
Raises
------
ValueError
If element_list is empty.
Returns
-------
tuple[dict[str, Any], dict[str, Any]]
Updated parameter_copy and parameters.
"""
element_list = parameter_copy.pop("element_list", None)
if element_list is not None:
Expand Down
4 changes: 2 additions & 2 deletions tests/utils/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

@contextmanager
def capture_logs(
level="INFO", format="{level}:{name}:{message}"
) -> Generator[list[loguru.Message], None, None]: # ign
level: str = "INFO", format: str = "{level}:{name}:{message}"
) -> Generator[list[loguru.Message], None, None]:
"""Capture loguru-based logs.
Custom context manager to test loguru-based logs. For details and usage examples,
Expand Down

0 comments on commit b3e79ee

Please sign in to comment.