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

Make support/python/mkdocstrings_handlers/cxx/__init__.py PEP 8 compliant (2 of 2) #4115

Conversation

rturrado
Copy link
Contributor

@rturrado rturrado commented Aug 10, 2024

Change indents to 4 spaces.
Run isort.

@rturrado rturrado changed the title Make support/python/mkdocstrings_handlers/cxx/__init__.py PEP 8 compliant (2nd part) Make support/python/mkdocstrings_handlers/cxx/__init__.py PEP 8 compliant (2 of 2) Aug 10, 2024
@@ -5,336 +5,336 @@
from __future__ import annotations
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed? I got an impression from the discussion on the previous PR that it was added but not used.

Copy link
Contributor Author

@rturrado rturrado Aug 10, 2024

Choose a reason for hiding this comment

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

Good spot:

  • Indeed, I had initially added this import because it allowed us to use the operator | (e.g., List[ElementTree.Element] | ElementTree.Element.
  • But then we change the code so that we were not using operator |.
  • However, I hadn't removed it because, if I did it, I was getting a compilation error.
  • I've fixed now that compilation error, by using -> List[Definition] instead of -> list[Definition] at convert_params.

This requires changing a 'list[]' into a 'List[]'.

We had previously added this import because the code was making use of operator '|'.
But that is no longer true, so the import shouldn't be needed.
@vitaut vitaut merged commit c71d03f into fmtlib:master Aug 11, 2024
42 checks passed
@vitaut
Copy link
Contributor

vitaut commented Aug 11, 2024

Merged, thanks for cleaning this up!

@rturrado
Copy link
Contributor Author

Merged, thanks for cleaning this up!

My pleasure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants