jsfehler / flake8-multiline-containers

A Flake8 plugin to ensure a consistent format for multiline containers.
MIT License
14 stars 3 forks source link

False negative inside docstring #102

Open hugo-viana opened 3 years ago

hugo-viana commented 3 years ago

Hi,

I have a problem using this plugin in a docstring lint validation.

My docstring is:

def dummy_df():
    """Return dummy dataframe.

    Example:

        >>> from pyspark.sql import SparkSession
        >>> spark = SparkSession.builder.getOrCreate()
        >>> df = spark.createDataFrame(
        ...     [
        ...         ("2021-08-31", "2021-05-31 00:00:00", "A", "A", "A"),
        ...         ("2021-05-31", "2021-01-31 00:00:00", "B", "B", "B"),
        ...     ],
        ...     [
        ...         "effective_end_date", "effective_start_date",
        ...         "entity_id", "country_id", "iuc",
        ...     ],
        ... )

And it returns a JS101 Multi-line container not broken after opening character twice in the list's closing brackets. In my opinion this it shouldn't be happening.

Also, have tried several different combinations but the result is still the same.

Is this a bug? or is there any explanation or workarround to aplly in this cases?

Best regards,

hugo-viana commented 2 years ago

Hi @jsfehler (sorry to bother),

Can you take a look a this issue (it's been opened for 7 months without any reply)? At least let me know if also think this is really a bug or no, please 🙏.

Thanks.

jsfehler commented 2 years ago

@hugo-viana This plugin ignores docstrings by design. If you're running Flake8 through another tool, at the very least I need the name of that tool. Links to source code if available, and links to documentation if not.