Skip to content

Commit

Permalink
pylint can't parse f-strings correctly
Browse files Browse the repository at this point in the history
- pylint fails to parse f-strings with same quotation marks
  as the string and in the curly brackets, e.g. f"{"foo"}" but
  f"{'foo'}" would work.
  • Loading branch information
JochenSiegWork committed Jan 15, 2025
1 parent ea186cc commit cd59c94
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def _add_shap_present_absent_features_text(
fig.text(
offset + 2 * delta,
0.18,
f" {"" if explanation.expected_value[-1] >= 0 else "-"}",
f" {'' if explanation.expected_value[-1] >= 0 else '-'}",
ha="center",
fontsize=fontsize_numbers,
color=color1,
Expand All @@ -326,7 +326,7 @@ def _add_shap_present_absent_features_text(
fig.text(
offset + 4 * delta,
0.18,
f" {"+" if sum_present_shap >= 0 else "-"}",
f" {'+' if sum_present_shap >= 0 else '-'}",
ha="center",
fontsize=fontsize_numbers,
color=color2,
Expand All @@ -342,7 +342,7 @@ def _add_shap_present_absent_features_text(
fig.text(
offset + 6 * delta,
0.18,
f" {"+" if sum_absent_shap >= 0 else "-"}",
f" {'+' if sum_absent_shap >= 0 else '-'}",
fontsize=fontsize_numbers,
ha="center",
color=color3,
Expand Down

0 comments on commit cd59c94

Please sign in to comment.