pylint-errors

W1501 (bad-open-mode)

:x: Problematic code:

def foo(file_path):
    with open(file_path, 'z') as fh:
        contents = fh.read()

    return contents

:heavy_check_mark: Correct code:

def foo(file_path):
    with open(file_path, 'r') as fh:
        contents = fh.read()

    return contents

Rationale:

Python supports r, w, a[, x] modes with b, +, and U (only with r) options.