Enable flake8-bugbear, but disable most checks. (#9499)

* Adds B00 to ignored checks.
* Fixes remaining issues.
This commit is contained in:
Jonathan de Jong 2021-03-16 19:19:27 +01:00 committed by GitHub
parent dd5e5dc1d6
commit 27d2820c33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 29 additions and 10 deletions

View file

@ -404,7 +404,11 @@ def _parse_key_servers(key_servers, federation_verify_certificates):
try:
jsonschema.validate(key_servers, TRUSTED_KEY_SERVERS_SCHEMA)
except jsonschema.ValidationError as e:
raise ConfigError("Unable to parse 'trusted_key_servers': " + e.message)
raise ConfigError(
"Unable to parse 'trusted_key_servers': {}".format(
e.message # noqa: B306, jsonschema.ValidationError.message is a valid attribute
)
)
for server in key_servers:
server_name = server["server_name"]