Skip to content

Bad Code #306

@elibroftw

Description

@elibroftw

operations = {o: ops.index(o) for o in ops}

Use enumerate instead.

def getOperationNameForId(i):

This is also unoptimized. It is as simple as

def get_operation_name(i: int):
    if i < len(ops):
        return ops[i]
    return f'Unknown Operation ID {i}'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions