mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
chore: enable ruff lint rule TRY201 and B904 to improve raise stack traces (#29166)
This commit is contained in:
committed by
GitHub
parent
5167d20f27
commit
4bb2e2f8af
@@ -123,8 +123,8 @@ def make_url_safe(raw_url: str | URL) -> URL:
|
||||
url = raw_url.strip()
|
||||
try:
|
||||
return make_url(url) # noqa
|
||||
except Exception:
|
||||
raise DatabaseInvalidError() # pylint: disable=raise-missing-from
|
||||
except Exception as ex:
|
||||
raise DatabaseInvalidError() from ex
|
||||
|
||||
else:
|
||||
return raw_url
|
||||
|
||||
Reference in New Issue
Block a user