X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/59f03d1b9d3c77f214087948b4d5e3dbb024d0b3..29dd25725303992d36c3a75c3a071080ac06085f:/tests/data/preview/comments9.py?ds=inline diff --git a/tests/data/preview/comments9.py b/tests/data/preview/comments9.py index 449612c..77b2555 100644 --- a/tests/data/preview/comments9.py +++ b/tests/data/preview/comments9.py @@ -114,6 +114,31 @@ class MyClass: pass +# Regression test for https://github.com/psf/black/issues/3454. +def foo(): + pass + # Trailing comment that belongs to this function + + +@decorator1 +@decorator2 # fmt: skip +def bar(): + pass + + +# Regression test for https://github.com/psf/black/issues/3454. +def foo(): + pass + # Trailing comment that belongs to this function. + # NOTE this comment only has one empty line below, and the formatter + # should enforce two blank lines. + +@decorator1 +# A standalone comment +def bar(): + pass + + # output @@ -252,3 +277,29 @@ class MyClass: # More comments. def first_method(self): pass + + +# Regression test for https://github.com/psf/black/issues/3454. +def foo(): + pass + # Trailing comment that belongs to this function + + +@decorator1 +@decorator2 # fmt: skip +def bar(): + pass + + +# Regression test for https://github.com/psf/black/issues/3454. +def foo(): + pass + # Trailing comment that belongs to this function. + # NOTE this comment only has one empty line below, and the formatter + # should enforce two blank lines. + + +@decorator1 +# A standalone comment +def bar(): + pass