Skip to content

Commit

Permalink
[FIX]connector_pms: collections.abc
Browse files Browse the repository at this point in the history
  • Loading branch information
DarioLodeiros committed Dec 17, 2024
1 parent e9a1352 commit f289c16
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions connector_pms/components_custom/mapper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2021 Eric Antones <eantones@nuobit.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import collections
import collections.abc
import logging
import uuid

Expand Down Expand Up @@ -29,7 +29,7 @@ def _apply_with_options(self, map_record):
for_create = self.options.for_create
result = {}
for from_attr, to_attr in self.direct:
if isinstance(from_attr, collections.Callable):
if isinstance(from_attr, collections.abc.Callable):
attr_name = self._direct_source_field_name(from_attr)
else:
attr_name = from_attr
Expand Down Expand Up @@ -69,7 +69,7 @@ def get_target_fields(self, map_record, fields):
fields = set(fields)
result = {}
for from_attr, to_attr in self.direct:
if isinstance(from_attr, collections.Callable):
if isinstance(from_attr, collections.abc.Callable):
# attr_name = self._direct_source_field_name(from_attr)
# TODO
raise NotImplementedError
Expand Down Expand Up @@ -155,7 +155,7 @@ def _map_direct(self, record, from_attr, to_attr):
:param to_attr: name of the target attribute
:type to_attr: str
"""
if isinstance(from_attr, collections.Callable):
if isinstance(from_attr, collections.abc.Callable):
return from_attr(self, record, to_attr)

value = record[from_attr]
Expand Down

0 comments on commit f289c16

Please sign in to comment.