bad-open-mode / W1501#
"%s" is not a valid mode for open.
Python supports: r, w, a[, x] modes with b, +, and U (only with r) options. See https://docs.python.org/3/library/functions.html#open
def foo(file_path): with open(file_path, "rwx") as file: # [bad-open-mode] contents = file.read()
def foo(file_path): with open(file_path, "r") as file: contents = file.read()
Created by the stdlib checker.