eschutho commented on code in PR #21570:
URL: https://github.com/apache/superset/pull/21570#discussion_r978954233
##########
superset/db_engine_specs/bigquery.py:
##########
@@ -396,10 +396,12 @@ def get_parameters_from_uri(
raise ValidationError("Invalid service credentials")
@classmethod
- def mask_encrypted_extra(cls, encrypted_extra: str) -> str:
+ def mask_encrypted_extra(
+ cls, encrypted_extra: Union[str, None]
+ ) -> Union[str, None]:
try:
- config = json.loads(encrypted_extra)
- except json.JSONDecodeError:
+ config = json.loads(encrypted_extra) # type:ignore
Review Comment:
@betodealmeida the other option here would be to have a default value if
encrypted_extra is None, but I opted for including it in the try/catch since it
already existed. Of course, this requires the type ignores because the linter
isn't aware of the try/except.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]