def getSettingInjectionListFromSettingValue(settingValue):
    if ObjectHelper.isList(settingValue):
        allElements = []
        for element in settingValue:
            elements = getSettingInjectionListFromSettingValue(element)
            if ObjectHelper.isList(elements):
                allElements += elements
        return allElements
    elif ObjectHelper.isNotNone(settingValue) and StringHelper.isNotBlank(
            settingValue):
        splitedSettingValue = settingValue.split(OPEN_SETTING_INJECTION)
        settingValueList = []
        completeSettingValue = c.NOTHING
        for segment in splitedSettingValue if settingValue.startswith(
                OPEN_SETTING_INJECTION) else splitedSettingValue[1:]:
            if ObjectHelper.isNotNone(segment) and StringHelper.isNotBlank(
                    segment):
                if ObjectHelper.isNotNone(segment.count(
                        c.OPEN_DICTIONARY)) and not segment.count(
                            c.OPEN_DICTIONARY) == segment.count(
                                c.CLOSE_DICTIONARY) and 0 < segment.count(
                                    c.OPEN_DICTIONARY):
                    completeSettingValue += segment
                else:
                    splitedSegment = segment.split(CLOSE_SETTING_INJECTION)
                    completeSettingValue += splitedSegment[0]
                    if ObjectHelper.isNotNone(
                            completeSettingValue) and StringHelper.isNotBlank(
                                completeSettingValue):
                        settingValueList.append(
                            f'{OPEN_SETTING_INJECTION}{completeSettingValue}{CLOSE_SETTING_INJECTION}'
                        )
                    completeSettingValue = c.NOTHING
        return settingValueList
    return []
def getValue(value):
    filteredValue = StringHelper.filterString(value)
    if isSettingValue(filteredValue):
        if StringHelper.isNotBlank(filteredValue):
            if c.OPEN_LIST == filteredValue[0]:
                return getList(filteredValue)
            elif c.OPEN_TUPLE == filteredValue[0]:
                return getTuple(filteredValue)
            elif c.OPEN_DICTIONARY == filteredValue[0]:
                return getDictionary(filteredValue)
            elif c.OPEN_SET == filteredValue[0]:
                return getSet(filteredValue)
        parsedValue = None
        try:
            parsedValue = int(filteredValue)
        except:
            try:
                parsedValue = float(filteredValue)
            except:
                try:
                    parsedValue = filteredValue
                    if not filteredValue is None:
                        if filteredValue == c.TRUE:
                            parsedValue = True
                        elif filteredValue == c.FALSE:
                            parsedValue = False
                except:
                    parsedValue = filteredValue
        return parsedValue
    return filteredValue
예제 #3
0
def prettyJson(
        origin,
        message,
        dictionaryInstance,
        quote = c.DOUBLE_QUOTE,
        tabCount = 0,
        nullValue = c.NULL_VALUE,
        trueValue = c.TRUE_VALUE,
        falseValue = c.FALSE_VALUE,
        logLevel = LOG,
        condition = True
    ) :
    if condition :
        stdout, stderr = EnvironmentHelper.getCurrentSoutStatus()
        prettyJsonValue = StringHelper.prettyJson(
            dictionaryInstance,
            quote = quote,
            tabCount = tabCount,
            nullValue = nullValue,
            trueValue = trueValue,
            falseValue = falseValue,
            withColors = SettingHelper.activeEnvironmentIsLocal(),
            joinAtReturn = False
        )
        LogHelperHelper.softLog(origin, StringHelper.join([message, c.COLON_SPACE, *prettyJsonValue]), logLevel)
        EnvironmentHelper.overrideSoutStatus(stdout, stderr)
def appendSettingKey(nodeKey, settingKey):
    if StringHelper.isNotBlank(nodeKey):
        if StringHelper.isNotBlank(settingKey):
            return f'{nodeKey}{c.DOT}{settingKey}'
        else:
            return nodeKey
    elif StringHelper.isNotBlank(settingKey):
        return settingKey
    else:
        return None
def keepSearching(keywordQuery, tree, querySet, history=None):
    if ObjectHelper.isDictionary(tree):
        for key in tree.keys():
            if StringHelper.isNotBlank(history):
                newHistory = f'{history}.{key}'
            else:
                newHistory = f'{key}'
            if StringHelper.isNotBlank(keywordQuery) and key == keywordQuery:
                querySet[newHistory] = tree[key]
            keepSearching(keywordQuery,
                          tree[key],
                          querySet,
                          history=newHistory)
def getFilteredSetting(settingKey, settingValue, nodeKey, settingTree):
    # print(f'getFilteredSetting: settingValue: "{settingValue}"')
    if StringHelper.isNotBlank(settingValue):
        settingEvaluationList = settingValue.split(c.COLON)
        if len(settingEvaluationList) > 1:
            defaultSettingValue = c.COLON.join(
                settingValue.split(c.COLON)[1:]).strip()
            # print(f'    defaultSettingValue: {defaultSettingValue}')
        else:
            defaultSettingValue = c.NONE
        if isSettingInjection(defaultSettingValue):
            return getSettingInjectionValue(settingKey, defaultSettingValue,
                                            nodeKey, settingTree)
        return StringHelper.filterString(defaultSettingValue)
    # print(f'    settingValue: {settingValue}')
    return settingValue
예제 #7
0
def softLog(origin,
            message,
            level,
            exception=None,
            muteStackTrace=False,
            newLine=False):
    if ObjectHelper.isNotNone(exception):
        hardLog(origin,
                message,
                exception,
                level,
                muteStackTrace=muteStackTrace)
    elif c.TRUE == getStatus(level):
        firstLayerColor, secondLayerColor, tirdLayerColor, resetColor = getColors(
            level)
        LogHelper.logIt(
            StringHelper.join([
                firstLayerColor, LEVEL_DICTIONARY[level][LOG_TEXT],
                *getOriginPortion(origin, tirdLayerColor, resetColor),
                secondLayerColor, message, resetColor,
                getNewLine(newLine,
                           exception=exception,
                           muteStackTrace=muteStackTrace)
            ]))
    elif not c.FALSE == getStatus(level):
        levelStatusError(method, level)
def containsValidSettingInjection(settingValue):
    if ObjectHelper.isNotNone(settingValue) and StringHelper.isNotBlank(
            settingValue) and 0 < settingValue.count(
                OPEN_SETTING_INJECTION) and settingValue.count(
                    c.OPEN_DICTIONARY) == settingValue.count(
                        c.CLOSE_DICTIONARY):
        splitedSettingValue = settingValue.split(OPEN_SETTING_INJECTION)
        settingValueList = []
        completeSettingValue = c.NOTHING
        for segment in splitedSettingValue if settingValue.startswith(
                OPEN_SETTING_INJECTION) else splitedSettingValue[1:]:
            if ObjectHelper.isNotNone(segment):
                if ObjectHelper.isNotNone(segment.count(
                        c.OPEN_DICTIONARY)) and not segment.count(
                            c.OPEN_DICTIONARY) == segment.count(
                                c.CLOSE_DICTIONARY) and 0 < segment.count(
                                    c.OPEN_DICTIONARY):
                    completeSettingValue += segment
                else:
                    splitedSegment = segment.split(CLOSE_SETTING_INJECTION)
                    completeSettingValue += splitedSegment[0]
                    settingValueList.append(
                        f'{OPEN_SETTING_INJECTION}{completeSettingValue}{CLOSE_SETTING_INJECTION}'
                    )
                    completeSettingValue = c.NOTHING
        return len(splitedSettingValue) == len(
            settingValueList) if settingValue.startswith(
                OPEN_SETTING_INJECTION) else len(
                    splitedSettingValue) == len(settingValueList) + 1
    elif ObjectHelper.isList(settingValue):
        return containsValidSettingInjection(str(settingValue))
    return False
def lineAproved(settingLine):
    approved = True
    if c.NEW_LINE == settingLine:
        approved = False
    if c.HASH_TAG in settingLine:
        filteredSettingLine = StringHelper.filterString(settingLine)
        if filteredSettingLine is None or c.NOTHING == filteredSettingLine or c.NEW_LINE == filteredSettingLine:
            approved = False
    return approved
예제 #10
0
def getTracebackMessage(muteStackTrace) :
    tracebackMessage = c.BLANK
    try :
        tracebackMessage = traceback.format_exc()
    except :
        tracebackMessage = f'{c.NEW_LINE}'
    if muteStackTrace :
        return StringHelper.join(tracebackMessage.split(c.NEW_LINE)[-2:], character=c.NEW_LINE)
    return LogHelperHelper.NO_TRACEBACK_PRESENT_MESSAGE if LogHelperHelper.NO_TRACEBACK_PRESENT == str(tracebackMessage) else tracebackMessage
예제 #11
0
def update(environmentKey, environmentValue, default=None) :
    if ObjectHelper.isNotEmpty(environmentKey) :
        associatedValue = None
        if not environmentValue is None :
            associatedValue = str(StringHelper.filterString(environmentValue))
            OS.environ[environmentKey] = associatedValue
        elif not default is None :
            associatedValue = str(StringHelper.filterString(default))
            OS.environ[environmentKey] = associatedValue
        else :
            try:
                delete(environmentKey)
            except Exception as exception :
                LogHelper.warning(update, f'Failed to delete "{environmentKey}" enviroment variable key', exception=exception)
        return associatedValue
    else :
        LogHelper.debug(update, f'arguments: environmentKey: {environmentKey}, environmentValue: {environmentValue}, default: {default}')
        raise Exception(f'Error associating environment variable "{environmentKey}" key to environment variable "{environmentValue}" value')
예제 #12
0
def logEnvironmentSettings():
    try:
        LogHelper.setting(logEnvironmentSettings,
                          StringHelper.prettyJson(EnvironmentHelper.getSet()))
    except Exception as exception:
        LogHelper.failure(
            logEnvironmentSettings,
            'Not possible do get a pretty json from EnvironmentHelper.getSet()',
            exception)
        LogHelper.setting(logEnvironmentSettings, EnvironmentHelper.getSet())
예제 #13
0
def querySetting(keywordQuery, tree):
    if StringHelper.isBlank(keywordQuery) or ObjectHelper.isNotDictionary(
            tree):
        LogHelper.warning(
            querySetting,
            f'''Not possible to parse "{tree}". It's either is not a dictionary or "{keywordQuery}" keyword query is blank'''
        )
    querySet = {}
    SettingHelperHelper.keepSearching(keywordQuery, tree, querySet)
    return querySet
def updateSettingValue(settingKey,
                       settingValue,
                       nodeKey,
                       settingTree,
                       isSameDepth=False,
                       isSettingInjection=False):
    # print(f'settingKey: {settingKey}, settingValue: {settingValue}, nodeKey: {nodeKey}, settingTree: {settingTree}, isSameDepth: {isSameDepth}')
    if StringHelper.isNotBlank(settingKey) and ObjectHelper.isNotNone(
            settingKey):
        # print(f'accessTree({nodeKey},{settingTree})[{settingKey}]: {accessTree(nodeKey,settingTree)}[{settingKey}]')
        # print(f'type(accessTree(nodeKey,settingTree)): {type(accessTree(nodeKey,settingTree))}')

        accessTree(nodeKey,
                   settingTree)[settingKey] = getSettingValueOrNewNode(
                       nodeKey,
                       settingKey,
                       settingValue,
                       isSameDepth=isSameDepth,
                       isSettingInjection=isSettingInjection)
    elif StringHelper.isNotBlank(nodeKey) and ObjectHelper.isNotNone(nodeKey):
        splittedNodeKey = nodeKey.split(c.DOT)
        if 1 < len(splittedNodeKey):
            accessSettingKey = splittedNodeKey[-1]
            accessNodeKey = c.DOT.join(splittedNodeKey[:-1])
        else:
            accessSettingKey = splittedNodeKey[-1]
            accessNodeKey = None
        accessTree(accessNodeKey,
                   settingTree)[accessSettingKey] = getSettingValueOrNewNode(
                       nodeKey,
                       settingKey,
                       settingValue,
                       isSameDepth=isSameDepth,
                       isSettingInjection=isSettingInjection)
    else:
        errorMessage = 'Node key and setting key cannot be None at the same time'
        exception = Exception(errorMessage)
        LogHelper.error(
            updateSettingValue,
            f'Error parsing settingKey: "{settingKey}", settingValue: {settingValue}, nodeKey: {nodeKey}, settingTree: {StringHelper.prettyPython(settingTree)}',
            errorMessage)
        raise exception
예제 #15
0
def getSetting(nodeKey, settingTree):
    setting = None
    try:
        setting = SettingHelperHelper.accessTree(nodeKey, settingTree)
    except Exception as exception:
        LogHelper.failure(
            getSetting,
            f'Not possible to get {nodeKey} node key. Returning "{setting}" by default',
            exception)
    return StringHelper.filterString(setting) if isinstance(setting,
                                                            str) else setting
예제 #16
0
def parseToPattern(given, pattern=DEFAULT_DATETIME_PATTERN, timedelta=False):
    given = given.strip()
    if StringHelper.isNotBlank(given):
        parsed = datetime.datetime.strptime(given, pattern)
        if timedelta and pattern in TIME_PATTERN_LIST:
            return datetime.timedelta(hours=parsed.hour,
                                      minutes=parsed.minute,
                                      seconds=parsed.second,
                                      milliseconds=0,
                                      microseconds=0)
        if pattern in DATETIME_PATTERN_LIST:
            return parsed
        elif pattern in DATE_PATTERN_LIST:
            return parsed.date()
        elif pattern in TIME_PATTERN_LIST:
            return parsed.time()
예제 #17
0
def updateSettingTree(toUpdateSettingTree, gatheringSettingTree):
    if ObjectHelper.isNotEmpty(gatheringSettingTree):
        if ObjectHelper.isNone(toUpdateSettingTree) or StringHelper.isBlank(
                toUpdateSettingTree):
            toUpdateSettingTree = {}
        if ObjectHelper.isCollection(
                gatheringSettingTree) and ObjectHelper.isDictionary(
                    gatheringSettingTree):
            for key, value in gatheringSettingTree.items():
                if ObjectHelper.isNotEmpty(value) and ObjectHelper.isNotNone(
                        value):
                    if key not in toUpdateSettingTree or ObjectHelper.isEmpty(
                            toUpdateSettingTree[key]):
                        toUpdateSettingTree[key] = value
                    else:
                        updateSettingTree(toUpdateSettingTree[key],
                                          gatheringSettingTree[key])
                elif key not in toUpdateSettingTree:
                    toUpdateSettingTree[key] = value
def handleLongStringOrSetting(settingKey, settingValue, nodeKey, settingTree,
                              longStringCapturing, quoteType, longStringList,
                              settingInjectionList, isSameDepth):
    # print(f'handleLongStringOrSetting: settingValue: {settingValue}')
    if StringHelper.isLongString(settingValue):
        longStringCapturing = True
        splitedSettingValueAsString = settingValue.split(c.TRIPLE_SINGLE_QUOTE)
        if c.TRIPLE_SINGLE_QUOTE in settingValue and splitedSettingValueAsString and c.TRIPLE_DOUBLE_QUOTE not in splitedSettingValueAsString[
                0]:
            quoteType = c.TRIPLE_SINGLE_QUOTE
        else:
            quoteType = c.TRIPLE_DOUBLE_QUOTE
        longStringList = [settingValue + c.NEW_LINE]
    else:
        nodeKey = updateSettingTreeAndReturnNodeKey(settingKey, settingValue,
                                                    nodeKey, settingTree,
                                                    isSameDepth)
    filteredSettingValue = getFilteredSetting(settingKey, settingValue,
                                              nodeKey, settingTree)
    return settingKey, filteredSettingValue, nodeKey, longStringCapturing, quoteType, longStringList
def getDictionary(value):
    splitedValue = value[1:-1].split(c.COLON)
    keyList = []
    for index in range(len(splitedValue) - 1):
        keyList.append(
            StringHelper.filterString(splitedValue[index].split(
                c.COMA)[-1].strip()))
    valueList = []
    valueListSize = len(splitedValue) - 1
    for index in range(valueListSize):
        if index == valueListSize - 1:
            correctValue = splitedValue[index + 1].strip()
        else:
            correctValue = c.COMA.join(splitedValue[index + 1].split(
                c.COMA)[:-1]).strip()
        valueList.append(getValue(correctValue))
    resultantDictionary = dict()
    for index in range(len(keyList)):
        resultantDictionary[keyList[index]] = valueList[index]
    return resultantDictionary
예제 #20
0
def getColors(level):
    if SettingHelper.LOCAL_ENVIRONMENT == EnvironmentHelper.get(
            SettingHelper.ACTIVE_ENVIRONMENT):
        firstLayerColor = LEVEL_DICTIONARY.get(level).get(
            FIRST_LAYER_COLOR
        ) if LEVEL_DICTIONARY.get(level) and LEVEL_DICTIONARY.get(level).get(
            FIRST_LAYER_COLOR) else c.NOTHING
        secondLayerColor = LEVEL_DICTIONARY.get(level).get(
            SECOND_LAYER_COLOR
        ) if LEVEL_DICTIONARY.get(level) and LEVEL_DICTIONARY.get(level).get(
            SECOND_LAYER_COLOR) else c.NOTHING
        tirdLayerColor = c.MUTTED_COLOR if c.MUTTED_COLOR else c.NOTHING
        resetColor = c.RESET_COLOR if c.RESET_COLOR else c.NOTHING
    else:
        firstLayerColor = c.NOTHING
        secondLayerColor = c.NOTHING
        tirdLayerColor = c.NOTHING
        resetColor = c.NOTHING
    return (firstLayerColor, secondLayerColor, tirdLayerColor,
            resetColor) if StringHelper.isNotBlank(firstLayerColor) else (
                c.NOTHING, c.NOTHING, c.NOTHING, c.NOTHING)
예제 #21
0
def printMessageLog(level,
                    message,
                    condition=False,
                    muteStackTrace=False,
                    newLine=True,
                    margin=True,
                    exception=None):
    if condition:
        firstLayerColor, secondLayerColor, tirdLayerColor, resetColor = getColors(
            level)
        LogHelper.logIt(
            StringHelper.join([
                c.TAB if margin else c.NOTHING, firstLayerColor,
                LEVEL_DICTIONARY[level][LOG_TEXT], secondLayerColor, message,
                *getErrorPortion(exception, muteStackTrace, firstLayerColor,
                                 secondLayerColor, tirdLayerColor, resetColor),
                resetColor,
                getNewLine(newLine,
                           exception=exception,
                           muteStackTrace=muteStackTrace)
            ]))
def accessTree(nodeKey, tree):
    if ObjectHelper.isNotNone(tree):
        strippedNodeKey = nodeKey.strip()
        if ObjectHelper.isEmpty(nodeKey):
            returnTree = None
            try:
                returnTree = StringHelper.filterString(tree)
            except Exception as exception:
                LogHelper.failure(
                    accessTree,
                    f'Failed to get filtered string from {tree} tree. Returning it the way it is by default',
                    exception)
                returnTree = tree
            return returnTree
        elif isinstance(nodeKey, str):
            nodeKeyList = nodeKey.split(c.DOT)
            if len(nodeKeyList) == 1:
                nextNodeKey = c.NOTHING
            else:
                nextNodeKey = c.DOT.join(nodeKeyList[1:])
            return accessTree(nextNodeKey, tree.get(nodeKeyList[0]))
예제 #23
0
def getArgsOrder(targetClass):
    noneArgs = []
    noneInstance = instanciateItWithNoArgsConstructor(targetClass,
                                                      amountOfNoneArgs=0,
                                                      args=noneArgs)
    strArgs = []
    for arg in range(len(noneArgs)):
        strArgs.append(RandomHelper.string(minimum=10))
    try:
        instance = targetClass(*strArgs)
        instanceDataDictionary = getAttributeDataDictionary(instance)
        argsOrderDictionary = {}
        for key, value in instanceDataDictionary.items():
            if StringHelper.isNotBlank(value):
                argsOrderDictionary[strArgs.index(value)] = key
        argsOrder = [
            argsOrderDictionary[key] for key in sorted(argsOrderDictionary)
        ]
    except Exception as exception:
        errorMessage = f'Not possible to get args order from "{getName(targetClass)}" target class'
        LogHelper.error(getArgsOrder, errorMessage, exception)
        raise Exception(errorMessage)
    return argsOrder
예제 #24
0
def getTestModuleNames(runOnly, ignore, globalsInstance):
    testsToRun = [] if ObjectHelper.isNone(
        runOnly) or ObjectHelper.isNotCollection(runOnly) else runOnly
    testsToIgnore = [] if ObjectHelper.isNone(
        ignore) or ObjectHelper.isNotCollection(ignore) else ignore
    runSpecificTests = ObjectHelper.isNotEmpty(testsToRun)
    LogHelper.prettyPython(getTestModuleNames,
                           f'runSpecificTests: {runSpecificTests}, testsToRun',
                           testsToRun,
                           logLevel=LogHelper.TEST)
    testModuleNames = []
    if ObjectHelper.isEmpty(testsToRun):
        testQueryTree = SettingHelper.querySetting(TEST_PACKAGE,
                                                   globalsInstance.apiTree)
        LogHelper.prettyPython(getTestModuleNames,
                               'Test query tree',
                               testQueryTree,
                               logLevel=LogHelper.TEST)
        testModuleNames += getTestModuleNamesFromQuerryTree(
            testQueryTree, runOnly, ignore)
    else:
        for testName in testsToIgnore:
            if testName in testsToRun:
                testModuleNames, testsToRun, runSpecificTests.remove(testName)
        for testName in testsToRun:
            testNameSplitted = testName.split(c.DOT)
            testModuleName = c.NOTHING
            if 2 == len(testNameSplitted):
                testModuleName = testNameSplitted[-2]
            if testModuleName not in testModuleNames and StringHelper.isNotBlank(
                    testName):
                testModuleNames.append(testModuleName)
    LogHelper.prettyPython(getTestModuleNames,
                           'Test module names',
                           testModuleNames,
                           logLevel=LogHelper.TEST)
    return testModuleNames, testsToRun, runSpecificTests
def getStrReturn(
        key,
        value,
        collectionType,
        quote,
        prettyFunction,
        tabCount,
        nullValue,
        trueValue,
        falseValue,
        withColors
    ) :
    valueValue = prettyFunction(
        value,
        quote = quote,
        tabCount = tabCount,
        nullValue = nullValue,
        trueValue = trueValue,
        falseValue = falseValue,
        withColors = withColors,
        joinAtReturn = False
    )
    if c.TYPE_DICT == collectionType :
        filteredAndColoredQuote = getFilteredAndColoredQuote(key, quote, prettyFunction, withColors, c.QUOTE_PROMPT_COLOR)
        filteredAndColoredColonSpace = getItAsColoredString(c.COLON_SPACE, prettyFunction, withColors, color=c.COLON_PROMPT_COLOR)
        return [tabCount * c.TAB, *filteredAndColoredQuote, *getItAsColoredString(key if StringHelper.prettyPython==prettyFunction else StringHelper.filterString(prettyFunction(key, quote=quote, tabCount=tabCount, nullValue=nullValue, trueValue=trueValue, falseValue=falseValue)), prettyFunction, withColors), *filteredAndColoredQuote, *filteredAndColoredColonSpace, *valueValue]
    else :
        return [tabCount * c.TAB, *valueValue]
def returnStr(strReturn, joinAtReturn) :
    return strReturn if not joinAtReturn else StringHelper.join(strReturn)
예제 #27
0
def getStatus(level):
    status = LogHelper.LOG_HELPER_SETTINGS.get(level)
    return status if isinstance(
        status, str) and StringHelper.isNotBlank(status) else c.TRUE
예제 #28
0
def isEmpty(thing):
    return StringHelper.isBlank(thing) if isinstance(
        thing, str) else isNone(thing) or isEmptyCollection(thing)
예제 #29
0
def equals(expected,
           toAssert,
           ignoreKeyList=None,
           ignoreCharactereList=None,
           visitedIdInstances=None,
           muteLogs=True):
    if isNone(expected) or isNone(toAssert):
        return expected is None and toAssert is None
    if isNativeClass(type(expected)):
        return expected == toAssert
    if isNone(visitedIdInstances):
        visitedIdInstances = []
    if isDictionary(expected) and isDictionary(toAssert):
        innerIgnoreCharactereList = [c.SPACE]
        if isNotNone(ignoreCharactereList):
            innerIgnoreCharactereList += ignoreCharactereList
        filteredResponse = StringHelper.filterJson(
            str(sortIt(filterIgnoreKeyList(expected, ignoreKeyList))),
            extraCharacterList=innerIgnoreCharactereList)
        filteredExpectedResponse = StringHelper.filterJson(
            str(sortIt(filterIgnoreKeyList(toAssert, ignoreKeyList))),
            extraCharacterList=innerIgnoreCharactereList)
        return filteredResponse == filteredExpectedResponse
    elif isCollection(expected) and isCollection(toAssert):
        areEquals = True
        try:
            for a, b in zip(expected, toAssert):
                areEquals = equals(a,
                                   b,
                                   ignoreKeyList=ignoreKeyList,
                                   ignoreCharactereList=ignoreCharactereList,
                                   visitedIdInstances=visitedIdInstances,
                                   muteLogs=muteLogs)
                if not areEquals:
                    break
            return areEquals
        except Exception as exception:
            areEquals = False
            LogHelper.log(
                equals,
                f'Different arguments in {expected} and {toAssert}. Returning "{areEquals}" by default',
                exception=exception)
    else:
        if isNotNone(toAssert) and id(toAssert) not in visitedIdInstances:
            areEquals = True
            try:
                if not muteLogs:
                    LogHelper.prettyPython(equals,
                                           f'expected',
                                           expected,
                                           logLevel=LogHelper.DEBUG,
                                           condition=not muteLogs)
                    LogHelper.prettyPython(equals,
                                           f'toAssert',
                                           toAssert,
                                           logLevel=LogHelper.DEBUG,
                                           condition=not muteLogs)
                areEquals = True and ObjectHelperHelper.leftEqual(
                    expected, toAssert, visitedIdInstances,
                    muteLogs=muteLogs) and ObjectHelperHelper.leftEqual(
                        toAssert,
                        expected,
                        visitedIdInstances,
                        muteLogs=muteLogs)
            except Exception as exception:
                areEquals = False
                LogHelper.log(
                    equals,
                    f'Different arguments in {expected} and {toAssert}. Returning "{areEquals}" by default',
                    exception=exception)
            visitedIdInstances.append(id(toAssert))
            return areEquals
        else:
            return True
def getAttibuteValue(settingLine):
    possibleValue = StringHelper.filterString(settingLine)
    return getValue(c.COLON.join(possibleValue.split(c.COLON)[1:]))