Skip to content

Commit dc4798e

Browse files
committed
rename to loads and classmethod
Config.loads
1 parent 94f6317 commit dc4798e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/recceiver/cfstore.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class CFConfig:
4444
timezone: str = ""
4545
cf_query_limit: int = 10000
4646

47-
@staticmethod
48-
def from_config_adapter(conf: ConfigAdapter) -> "CFConfig":
47+
@classmethod
48+
def loads(cls, conf: ConfigAdapter) -> "CFConfig":
4949
return CFConfig(
5050
alias_enabled=conf.get("alias", False),
5151
record_type_enabled=conf.get("recordType", False),
@@ -206,7 +206,7 @@ def from_channelfinder_dict(channel_dict: Dict[str, Any]) -> "CFChannel":
206206
@implementer(interfaces.IProcessor)
207207
class CFProcessor(service.Service):
208208
def __init__(self, name, conf):
209-
self.cf_config = CFConfig.from_config_adapter(conf)
209+
self.cf_config = CFConfig.loads(conf)
210210
_log.info("CF_INIT %s", self.cf_config)
211211
self.name = name
212212
self.channel_ioc_ids = defaultdict(list)

0 commit comments

Comments
 (0)