Modernize legacy Python 2 syntax with pyupgrade.
Generated by `pyupgrade --py3-plus --keep-percent-format` followed by manual indentation fixes. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
parent
543eb396b9
commit
e30b3b094b
107 changed files with 192 additions and 244 deletions
|
@ -65,7 +65,7 @@ def read_config_file(config_file_path: str, bot_name: Optional[str]=None) -> Dic
|
|||
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 IOError("Could not read config file {}: File not found.".format(config_file_path))
|
||||
raise OSError("Could not read config file {}: File not found.".format(config_file_path))
|
||||
parser = configparser.ConfigParser()
|
||||
parser.read(config_file_path)
|
||||
return parser
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue