<commit_before>import configparser
from .credential_client import CredentialClient
import arrow
from datetime import timedelta


class CredentialReportRow(object):
    user = "unknown"
    arn = "unknown"
    password_active = "unknown"
    password_last_used = "unknown"
    password_last_rotated = "unknown"
    password_next_rotation = "unknown"
    mfa_active = "unknown"

    def __init__(self, row):
        self.user = row[0]
        self.arn = row[1]
        self.password_active = row[3]
        self.password_last_used = row[4]
        self.password_last_rotated = row[5]
        self.password_next_rotation = row[6]
        self.mfa_active = row[7]
        self.access_key_1_active = row[8]
        self.access_key_1_last_rotated = row[9]
        self.access_key_1_last_used = row[10]
        self.access_key_2_active = row[13]
        self.access_key_2_last_rotated = row[14]
        self.access_key_2_last_used = row[15]
    def mfa(self):
        return CredentialCheckResponse('mfa', self.mfa_active == 'true', self.user).get_response()


class CredentialReportActionRunner(object):
    def __init__(self, row, config):
        self.__row = row
        self.__config = config

    def mfa(self):
        return CredentialCheckResponse('mfa', self.__row.mfa_active == 'true', self.__row.user).get_response()

    def password_max_age(self):
#        if self.__row.password_last_rotated != 'N/A':
#            return CredentialCheckResponse('password_max_age', self._is_older_than_days(
#                self.__row.password_last_rotated,
#                self.__config.password_max_age
#            ), self.__row.user).get_response()
#        return None

        password_older_than_max_age = self._no_activity_max_age(self.__config.password_max_age,['password'])
        return CredentialCheckResponse('password_max_age', not password_older_than_max_age,self.__row.user).get_response()

    def access_keys_max_age(self):
        check_list = ['access_key_1','access_key_2']
        if self._no_activity_max_age(self.__config.access_keys_max_age, check_list):<commit_msg>remove cruft<commit_after>import configparser
from .credential_client import CredentialClient
import arrow
from datetime import timedelta


class CredentialReportRow(object):
    user = "unknown"
    arn = "unknown"
    password_active = "unknown"
    password_last_used = "<PASSWORD>"
    password_last_rotated = "<PASSWORD>"
    password_next_rotation = "<PASSWORD>"
    mfa_active = "unknown"

    def __init__(self, row):
        self.user = row[0]
        self.arn = row[1]
        self.password_active = row[3]
        self.password_last_used = row[4]
        self.password_last_rotated = row[5]
        self.password_next_rotation = row[6]
        self.mfa_active = row[7]
        self.access_key_1_active = row[8]
        self.access_key_1_last_rotated = row[9]
        self.access_key_1_last_used = row[10]
        self.access_key_2_active = row[13]
        self.access_key_2_last_rotated = row[14]
        self.access_key_2_last_used = row[15]
    def mfa(self):
        return CredentialCheckResponse('mfa', self.mfa_active == 'true', self.user).get_response()


class CredentialReportActionRunner(object):
    def __init__(self, row, config):
        self.__row = row
        self.__config = config

    def mfa(self):
        return CredentialCheckResponse('mfa', self.__row.mfa_active == 'true', self.__row.user).get_response()

    def password_max_age(self):
        password_older_than_max_age = self._no_activity_max_age(self.__config.password_max_age,['password'])
        return CredentialCheckResponse('password_max_age', not password_older_than_max_age,self.__row.user).get_response()

    def access_keys_max_age(self):
        check_list = ['access_key_1','access_key_2']
        if self._no_activity_max_age(self.__config.access_keys_max_age, check_list):
{'fraction_non_alphanumeric': 0.1016554578375582, 'fraction_numerical': 0.012933264355923435, 'mean_word_length': 3.480880648899189, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7201228', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1233, 'n_words': 203}