Skip to content

How to noqa E501 in docstring? #7011

Answered by zanieb
jamesbraza asked this question in Q&A
Aug 30, 2023 · 1 comments · 6 replies
Discussion options

You must be logged in to vote

If you do

def foo() -> None:
    """
    Some Google-style docstring.

    .. mermaid::

       flowchart TD
           A([Start]) --> B["`Apples Apples Apples Apples Apples Apples Apples Apples Apples Apples Apples`"]
    """  # noqa: E501

it will work. ruff: noqa is for file-level suppression and shouldn't be used for suppressing a single item — which is why you get that warning.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@jamesbraza
Comment options

@zanieb
Comment options

Answer selected by jamesbraza
@jamesbraza
Comment options

@charliermarsh
Comment options

@jamesbraza
Comment options

@jamesbraza
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants