fix(slack): fix indented triple-quoted string in v1 API deprecation warning - #41393
Conversation
…arning The warning message in should_use_v2_api() used a triple-quoted string that included the function body's indentation in the log output. Replace with adjacent string literals so the message logs on a single clean line.
Code Review Agent Run #3e261eActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #41393 +/- ##
=======================================
Coverage 64.41% 64.41%
=======================================
Files 2654 2654
Lines 145386 145386
Branches 33557 33557
=======================================
Hits 93653 93653
Misses 50034 50034
Partials 1699 1699
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What was the deprecation warning?
should_use_v2_api()insuperset/utils/slack.pylogged a warning using a triple-quoted string. Because the string was written inside an indentedexceptblock, Python included the code-level indentation in the message — each continuation line got 12 leading spaces. Production logs showed:What was changed?
Replaced the triple-quoted string with adjacent string literals so the message renders as a single clean line:
No logic change. Same words, no whitespace artifact.
No-behavior-change note
This is a log message formatting fix only.
should_use_v2_api()returns exactly the same values in all paths. No imports added or removed.Test plan
pre-commit run --files superset/utils/slack.pylogger.warningcall manually or via existing Slack notification tests