mirror of
https://github.com/apache/superset.git
synced 2026-04-18 15:44:57 +00:00
chore: Upgrade pylint to 2.5.3 and fix most new rules (#10101)
* Bump pylint version to 2.5.3 * Add a global disable for the most common new pylint error * Fix a bunch of files containing very few errors * More pylint tweakage, low-hanging fruit * More easy stuff... * Fix more erroring files * Fix the last couple of errors, clean pylint! * Black * Fix mypy issue in connectors/druid/models.py
This commit is contained in:
@@ -138,7 +138,7 @@ class PrestoDBSQLValidator(BaseSQLValidator):
|
||||
end_column=end_column,
|
||||
)
|
||||
except Exception as ex:
|
||||
logger.exception(f"Unexpected error running validation query: {ex}")
|
||||
logger.exception("Unexpected error running validation query: %s", str(ex))
|
||||
raise ex
|
||||
|
||||
@classmethod
|
||||
@@ -156,7 +156,7 @@ class PrestoDBSQLValidator(BaseSQLValidator):
|
||||
parsed_query = ParsedQuery(sql)
|
||||
statements = parsed_query.get_statements()
|
||||
|
||||
logger.info(f"Validating {len(statements)} statement(s)")
|
||||
logger.info("Validating %i statement(s)", len(statements))
|
||||
engine = database.get_sqla_engine(
|
||||
schema=schema,
|
||||
nullpool=True,
|
||||
@@ -174,6 +174,6 @@ class PrestoDBSQLValidator(BaseSQLValidator):
|
||||
)
|
||||
if annotation:
|
||||
annotations.append(annotation)
|
||||
logger.debug(f"Validation found {len(annotations)} error(s)")
|
||||
logger.debug("Validation found %i error(s)", len(annotations))
|
||||
|
||||
return annotations
|
||||
|
||||
Reference in New Issue
Block a user