File: docstring_doubles.py

package info (click to toggle)
flake8-quotes 3.4.0-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 300 kB
  • sloc: python: 938; sh: 28; makefile: 2
file content (38 lines) | stat: -rw-r--r-- 716 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""
Double quotes multiline module docstring
"""

"""
this is not a docstring
"""

l = []

class Cls:
    """
    Double quotes multiline class docstring
    """

    """
    this is not a docstring
    """

    # The colon in the list indexing below is an edge case for the docstring scanner
    def f(self, bar="""
        definitely not a docstring""",
        val=l[Cls():3]):
        """
        Double quotes multiline function docstring
        """

        some_expression = 'hello world'

        """
        this is not a docstring
        """

        if l:
            """
            Looks like a docstring, but in reality it isn't - only modules, classes and functions
            """
            pass