X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/4abc0399b527c50369c448e00d6e204af74026e5..29dd25725303992d36c3a75c3a071080ac06085f:/tests/data/preview/comments9.py 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