Function _transform_records
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
def _transform_records(self, start, end, counter):
for _, record in self.client.get_employees(
filterUpdatedStartDate=singer.utils.strftime(start), filterUpdatedEndDate=singer.utils.strftime(end)
).yield_records():
if record:
Cyclomatic complexity is too high in method _transform_records. (10)
@backoff.on_exception(
backoff.expo, requests.exceptions.HTTPError, max_time=240, giveup=is_fatal_code, logger=LOGGER
)
@backoff.on_exception(
backoff.expo, (requests.exceptions.ConnectionError, requests.exceptions.Timeout), max_time=240, logger=LOGGER
Cyclomatic complexity is too high in method whitelist_sensitive_info. (7)
def whitelist_sensitive_info(self, data: Dict) -> Dict:
for collection in WHITELISTED_COLLECTIONS:
if data.get(collection, {}).get("Items") is not None:
items = []
for i, item in enumerate(data.get(collection, {}).get("Items")):
Cyclomatic complexity is too high in class EmployeesStream. (7)
@attr.s
class EmployeesStream(DayforceStream):
tap_stream_id: ClassVar[str] = "employees"
key_properties: ClassVar[List[str]] = ["XRefCode"]
bookmark_properties: ClassVar[str] = "SyncTimestampUtc"
Cyclomatic complexity is too high in method _transform_records. (6)
@backoff.on_exception(
backoff.expo, requests.exceptions.HTTPError, max_time=240, giveup=is_fatal_code, logger=LOGGER
)
@backoff.on_exception(
backoff.expo, (requests.exceptions.ConnectionError, requests.exceptions.Timeout), max_time=240, logger=LOGGER
Function whitelist_sensitive_info
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
def whitelist_sensitive_info(self, data: Dict) -> Dict:
for collection in WHITELISTED_COLLECTIONS:
if data.get(collection, {}).get("Items") is not None:
items = []
for i, item in enumerate(data.get(collection, {}).get("Items")):