All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
4 # Has many lines. Many, many lines.
5 # Many, many, many lines.
8 Possibly also many, many lines.
15 from b.c import X # some noqa comment
23 # Some comment before a function.
26 def function(default=None):
27 """Docstring comes first.
31 # FIXME: Some comment about why this function is crap but still in production.
34 if inner_imports.are_evil():
35 # Explains why we have this if.
36 # In great detail indeed.
38 return x.method1() # type: ignore
40 # This return is also commented for some reason.
44 # Explains why we use global state.
45 GLOBAL_STATE = {'a': a(1), 'b': a(2), 'c': a(3)}
49 # This time two lines.
53 """Docstring for class Foo. Example from Sphinx docs."""
55 #: Doc comment for class attribute Foo.bar.
56 #: It can have multiple lines.
59 flox = 1.5 #: Doc comment for Foo.flox. One line only.
62 """Docstring for class attribute Foo.baz."""
65 #: Doc comment for instance attribute qux.
69 """Docstring for instance attribute spam."""
74 async with X.open_async() as x: # Some more comments
75 result = await x.method1()
76 # Comment after ending a block.
78 print('A OK', file=sys.stdout)
79 # Comment between things.
83 # Some closing comments.
84 # Maybe Vim or Emacs directives for formatting.