john-bodley commented on a change in pull request #16146:
URL: https://github.com/apache/superset/pull/16146#discussion_r687372973
##########
File path: superset/utils/pandas_postprocessing.py
##########
@@ -593,7 +593,7 @@ def geohash_encode(
)
return _append_columns(df, encode_df, {"geohash": geohash})
except ValueError:
- QueryObjectValidationError(_("Invalid longitude/latitude"))
+ raise QueryObjectValidationError(_("Invalid longitude/latitude"))
Review comment:
Fixes a potential bug as the exception was never raised.
##########
File path: superset/models/core.py
##########
@@ -536,9 +536,10 @@ def get_all_table_names_in_schema(
]
except Exception as ex: # pylint: disable=broad-except
logger.warning(ex)
+ return []
Review comment:
Kind of surprised Mypy didn't find this.
##########
File path: superset/utils/core.py
##########
@@ -1228,8 +1228,8 @@ def get_main_metric_name(metrics: Sequence[Metric]) ->
Optional[str]:
def ensure_path_exists(path: str) -> None:
try:
os.makedirs(path)
- except OSError as exc:
- if not (os.path.isdir(path) and exc.errno == errno.EEXIST):
+ except OSError as ex:
Review comment:
This fixes a potential bug as `exc` is defined globally.
##########
File path: superset/models/tags.py
##########
@@ -46,6 +46,7 @@ class TagTypes(enum.Enum):
can find all their objects by querying for the tag `owner:alice`.
"""
+ # pylint: disable=invalid-name
Review comment:
I opted not the change these enums to uppercase as the string
representation of the lowercase name is used throughout and I wanted to
minimize the size of the PR.
--
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]