Skip to content

Commit

Permalink
BigQuery:
Browse files Browse the repository at this point in the history
- Use splitlines instead and avoid ignoring pylint rules
  • Loading branch information
Antonio-RiveroMartnez committed Nov 9, 2022
1 parent 5c8bf8e commit afa7200
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions superset/db_engine_specs/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,12 +582,7 @@ def _get_fields(cls, cols: List[Dict[str, Any]]) -> List[Any]:
@classmethod
def parse_error_exception(cls, exception: Exception) -> Exception:
try:
return Exception(
str(exception) # pylint: disable=use-maxsplit-arg
.rsplit("\n")[0]
.rsplit(":")[1]
.strip()
)
return Exception(str(exception).splitlines()[0].rsplit(":")[1].strip())
except Exception: # pylint: disable=broad-except
# If for some reason we get an exception, for example, no new line
# We will return the original exception
Expand Down

0 comments on commit afa7200

Please sign in to comment.