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

some fixes for pycodestyle E221 #36556

Merged
merged 1 commit into from
Nov 5, 2023
Merged

Conversation

fchapoton
Copy link
Contributor

this is fixing some of the warnings

E221 multiple spaces before operator

mostly scripted with autopep8, plus a few manual cases

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.

@mkoeppe mkoeppe requested a review from soehms October 31, 2023 21:50
Copy link
Member

@soehms soehms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following doctest failure seems to be related to your previous commit:

File "src/sage/interfaces/tides.py", line 695, in sage.interfaces.tides.?
Failed example:
    l[30]
Expected:
    '\t\tmpfrts_pow_t_c(itd, link[2], "-1.500000000000000000000000000000000000000000000000000", link[3], i);\n'
Got:
    '\t\tmpfrts_pow_t_c(itd, link[2], "-1.500000000000000000000000000000000000000000000000000", link[{i}], i);\n'
**********************************************************************
File "src/sage/interfaces/tides.py", line 736, in sage.interfaces.tides.?
Failed example:
    l[30]
Expected:
    '\t\tmpfrts_pow_t_c(itd, link[2], "-1.500000000000000000000000000000000000000000000000000", link[3], i);\n'
Got:
    '\t\tmpfrts_pow_t_c(itd, link[2], "-1.500000000000000000000000000000000000000000000000000", link[{i}], i);\n'
**********************************************************************
1 item had failures:
   2 of  95 in sage.interfaces.tides.?
    [120 tests, 2 failures, 0.28 s]

Copy link
Member

@soehms soehms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now there is this one:

File "src/sage/interfaces/tides.py", line 691, in sage.interfaces.tides.?
Failed example:
    l[15]
Expected:
    '\tstatic int PARAMETERS = 0;\n'
Got:
    '\tstatic int PARAMETERS = 4;\n'
**********************************************************************
1 item had failures:
   1 of  95 in sage.interfaces.tides.?
    [120 tests, 1 failure, 0.09 s]

Probably caused by this change (PAR -> VAR):

-    outfile.write("\tstatic int PARAMETERS = {};\n".format(PAR))
...
+        outfile.write(f"\tstatic int PARAMETERS = {VAR};\n")

@miguelmarco, can you check that the generated files are still good for the TIDES library? (not necessary any more).

BTW: The workflows that run doctest of optional and experimental packages seem to be broken (at least the ones that run for the tag 10.2.beta9, example for Ubuntu jammy maximal is failing here).

Is this a known issue?

Copy link

github-actions bot commented Nov 2, 2023

Documentation preview for this PR (built with commit 0a81064; changes) is ready! 🎉

Copy link
Member

@soehms soehms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

The generated files of the examples are not changed by the branch.

Anyway, the idea behind E221 is not clear to me. Looking through the changes my impression is that it makes code less readable.

@vbraun vbraun merged commit 1a4599f into sagemath:develop Nov 5, 2023
@mkoeppe mkoeppe added this to the sage-10.2 milestone Nov 5, 2023
@fchapoton fchapoton deleted the some_fixes_E221 branch November 5, 2023 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants