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

Decode response in f-string #34518

Merged
merged 2 commits into from
Sep 21, 2023
Merged

Conversation

Taragolis
Copy link
Contributor

Fix construction exception messages which contains response in bytes, it should make mypy happy, and also fix the main

airflow/providers/databricks/hooks/databricks_base.py:248: error: On Python 3
formatting "b'abc'" with "{}" produces "b'abc'", not "abc"; use "{!r}" if this
is desired behavior  [str-bytes-safe]
                raise AirflowException(f"Response: {e.response.content}, S...
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
airflow/providers/databricks/hooks/databricks_base.py:282: error: On Python 3
formatting "b'abc'" with "{}" produces "b'abc'", not "abc"; use "{!r}" if this
is desired behavior  [str-bytes-safe]
                raise AirflowException(f"Response: {e.response.content}, S...
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@vincbeck vincbeck merged commit 966c2bc into apache:main Sep 21, 2023
43 checks passed
@Taragolis Taragolis deleted the decode-response-in-fstring branch September 22, 2023 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants