Skip to content

Formatting isn't applied across the whole file #302

Open
@deepyaman

Description

Python Version

3.10.11

Package Version

1.16.0

Description

When I format https://github.com/deepyaman/ibis/blob/build/blacken-docs-issue/ibis/expr/operations/udf.py using blacken-docs, only one code block seems to be getting parsed:

diff --git a/ibis/expr/operations/udf.py b/ibis/expr/operations/udf.py
index 09f6e41ee..bac4033ae 100644
--- a/ibis/expr/operations/udf.py
+++ b/ibis/expr/operations/udf.py
@@ -191,7 +191,8 @@ class scalar(_UDF):
         >>> import ibis
         >>> @ibis.udf.scalar.builtin
         ... def hamming(a: str, b: str) -> int:
-        ...     '''Compute the Hamming distance between two strings.'''
+        ...     """Compute the Hamming distance between two strings."""
+        ...
         >>> expr = hamming("duck", "luck")
         >>> con = ibis.connect("duckdb://")
         >>> con.execute(expr)

I would expect all of the remaining code blocks to also get formatted (similar issues with missing blank line and docstring quoting).

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions