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

Reenable double-newline-removal for python files properly #14

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

dmontagu
Copy link
Contributor

@dmontagu dmontagu commented Jul 11, 2023

This is the diff relative to the commit before the latest commit on main.

diff --git a/pytest_examples/eval_example.py b/pytest_examples/eval_example.py
index ddedbb4..aebe106 100644
--- a/pytest_examples/eval_example.py
+++ b/pytest_examples/eval_example.py
@@ -206,8 +206,8 @@ class EvalExample:
 
         :param example: The example to format.
         """
-        self.format_black(example)
         self.format_ruff(example)
+        self.format_black(example)
 
     def format_black(self, example: CodeExample) -> None:
         """

So this is mostly just reverting the previous change, but changing the order here ensures that we don't get wrong reformatting when removing the double newline from python files. (I tested this in pydantic and it seems all doc tests work after running pytest --update-examples)

@dmontagu dmontagu merged commit db4baa8 into main Jul 11, 2023
8 checks passed
@dmontagu dmontagu deleted the reenable-py-docstring-trim branch July 11, 2023 17:24
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.

1 participant