rusackas commented on code in PR #39118:
URL: https://github.com/apache/superset/pull/39118#discussion_r3523786914
##########
superset/databases/api.py:
##########
@@ -630,8 +630,9 @@ def delete(self, pk: int) -> Response:
@protect()
@statsd_metrics
@event_logger.log_this_with_context(
- action=lambda self, *args, **kwargs: f"{self.__class__.__name__}"
- f".sync-permissions",
+ action=lambda self, *args, **kwargs: (
+ f"{self.__class__.__name__}.sync-permissions"
Review Comment:
`databases/api.py` isn't in this PR anymore... it came along with a
cherry-picked CI-fix commit that's since been reverted. Nothing here for this
PR to fix.
##########
superset/utils/excel.py:
##########
@@ -70,9 +70,9 @@ def apply_column_types(
# if the number is too large, convert it to a string
# Excel does not support numbers larger than 10^15
df[column] = df[column].apply(
- lambda x: str(x)
- if isinstance(x, (int, float)) and abs(x) > 10**15
- else x
+ lambda x: (
+ str(x) if isinstance(x, (int, float)) and abs(x) >
10**15 else x
Review Comment:
Same story as the `api.py` thread... `excel.py` was only touched by the
reverted cherry-pick, so it's not part of this diff. Worth a look if it
resurfaces in its own PR.
##########
tests/integration_tests/security/api_tests.py:
##########
@@ -275,8 +276,9 @@ def
test_guest_validator_hook_real_world_example_positive(self):
@with_config(
{
- "GUEST_TOKEN_VALIDATOR_HOOK": lambda x: len(x["rls"]) == 1
- and "tenant_id=" in x["rls"][0]["clause"]
+ "GUEST_TOKEN_VALIDATOR_HOOK": lambda x: (
+ len(x["rls"]) == 1 and "tenant_id=" in x["rls"][0]["clause"]
+ )
Review Comment:
This test file isn't in the diff anymore... the commit that touched it was
reverted to keep this PR a pure rename.
##########
tests/integration_tests/security/api_tests.py:
##########
@@ -275,8 +276,9 @@ def
test_guest_validator_hook_real_world_example_positive(self):
@with_config(
{
- "GUEST_TOKEN_VALIDATOR_HOOK": lambda x: len(x["rls"]) == 1
- and "tenant_id=" in x["rls"][0]["clause"]
+ "GUEST_TOKEN_VALIDATOR_HOOK": lambda x: (
+ len(x["rls"]) == 1 and "tenant_id=" in x["rls"][0]["clause"]
+ )
Review Comment:
Duplicate of the thread above, same reverted commit.
--
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]