pyupgrade: Reformat with --py36-plus.
This includes mainly fixes of string literals using f-strings or .format(...), as well as unpacking of list comprehensions.
This commit is contained in:
parent
e27ac0ddbe
commit
9ce7c52a10
78 changed files with 356 additions and 389 deletions
|
@ -98,7 +98,7 @@ def read_config_file(
|
|||
ignored_sections = parser.sections()[1:]
|
||||
|
||||
if len(ignored_sections) > 0:
|
||||
logging.warning("Sections except the '{}' will be ignored".format(bot_section))
|
||||
logging.warning(f"Sections except the '{bot_section}' will be ignored")
|
||||
|
||||
return bots_config
|
||||
|
||||
|
@ -106,7 +106,7 @@ def read_config_file(
|
|||
def parse_config_file(config_file_path: str) -> configparser.ConfigParser:
|
||||
config_file_path = os.path.abspath(os.path.expanduser(config_file_path))
|
||||
if not os.path.isfile(config_file_path):
|
||||
raise OSError("Could not read config file {}: File not found.".format(config_file_path))
|
||||
raise OSError(f"Could not read config file {config_file_path}: File not found.")
|
||||
parser = configparser.ConfigParser()
|
||||
parser.read(config_file_path)
|
||||
return parser
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue