Skip to content

Commit

Permalink
refactor: rename settings interface, rename plugin attritbute
Browse files Browse the repository at this point in the history
renamed plugin attributes and settings interface
  • Loading branch information
cademirch committed Feb 18, 2025
1 parent 0c1adbe commit 9c7020d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/snakemake_interface_logger_plugins/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import Optional
from snakemake_interface_logger_plugins.settings import (
LogHandlerSettingsBase,
LoggerSettingsInterface,
OutputSettingsLoggerInterface,
)
from abc import ABC, abstractmethod
from logging import Handler
Expand All @@ -15,7 +15,7 @@
class LogHandlerBase(ABC, Handler):
def __init__(
self,
common_settings: LoggerSettingsInterface,
common_settings: OutputSettingsLoggerInterface,
settings: Optional[LogHandlerSettingsBase],
) -> None:
self.common_settings = common_settings
Expand Down Expand Up @@ -53,4 +53,4 @@ def has_filter(self) -> bool:
def has_formatter(self) -> bool:
"""
Whether this plugin attaches its own formatter
"""
"""
4 changes: 2 additions & 2 deletions src/snakemake_interface_logger_plugins/registry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def load_plugin(self, name: str, module: types.ModuleType) -> Plugin:

return Plugin(
_name=name,
log_handler=module.LoggerPlugin,
log_handler=module.LogHandler,
_logger_settings_cls=getattr(module, "LogHandlerSettings", None),
)

Expand All @@ -45,7 +45,7 @@ def expected_attributes(self) -> Mapping[str, AttributeType]:
mode=AttributeMode.OPTIONAL,
kind=AttributeKind.CLASS,
),
"LoggerPlugin": AttributeType(
"LogHandler": AttributeType(
cls=LogHandlerBase,
mode=AttributeMode.REQUIRED,
kind=AttributeKind.CLASS,
Expand Down
2 changes: 1 addition & 1 deletion src/snakemake_interface_logger_plugins/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from typing import Optional, Sequence


class LoggerSettingsInterface(ABC):
class OutputSettingsLoggerInterface(ABC):
printshellcmds: bool
nocolor: bool
quiet: Optional[Sequence]
Expand Down

0 comments on commit 9c7020d

Please sign in to comment.