Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix deprecation warnings due to invalid escape sequences. #10710

Merged
merged 2 commits into from
Sep 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ def _try_json_readsha( # pylint: disable=unused-argument
# ---------------------------------------------------------

# Your App secret key
SECRET_KEY = (
"\2\1thisismyscretkey\1\2\e\y\y\h" # pylint: disable=anomalous-backslash-in-string
)
SECRET_KEY = "\2\1thisismyscretkey\1\2\\e\\y\\y\\h"

# The SQLAlchemy connection string.
SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join(DATA_DIR, "superset.db")
Expand Down
4 changes: 1 addition & 3 deletions superset/models/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
def json_to_dict(json_str: str) -> Dict[Any, Any]:
if json_str:
val = re.sub(",[ \t\r\n]+}", "}", json_str)
val = re.sub(
",[ \t\r\n]+\]", "]", val # pylint: disable=anomalous-backslash-in-string
)
val = re.sub(",[ \t\r\n]+\\]", "]", val)
return json.loads(val)

return {}
Expand Down