• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

psf / black / 6128207494
96%
master: 96%

Build:
Build:
LAST BUILD BRANCH: fixing_issue_4730
DEFAULT BRANCH: master
Ran 09 Sep 2023 01:53AM UTC
Jobs 4
Files 34
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Sep 2023 01:51AM UTC coverage: 96.519% (+0.001%) from 96.518%
6128207494

push

github

web-flow
Blank line between nested and function def in stub files. (#3862)

The idea behind this change is that we stop looking into previous body to determine if there should be a blank before a function or class definition.

Input:

```python
import sys

if sys.version_info > (3, 7):
    class Nested1:
        assignment = 1
        def function_definition(self): ...
    def f1(self) -> str: ...
    class Nested2:
        def function_definition(self): ...
        assignment = 1
    def f2(self) -> str: ...

if sys.version_info > (3, 7):
    def nested1():
        assignment = 1
        def function_definition(self): ...
    def f1(self) -> str: ...
    def nested2():
        def function_definition(self): ...
        assignment = 1
    def f2(self) -> str: ...
```

Stable style
```python
import sys

if sys.version_info > (3, 7):
    class Nested1:
        assignment = 1
        def function_definition(self): ...

    def f1(self) -> str: ...

    class Nested2:
        def function_definition(self): ...
        assignment = 1
    def f2(self) -> str: ...

if sys.version_info > (3, 7):
    def nested1():
        assignment = 1
        def function_definition(self): ...

    def f1(self) -> str: ...
    def nested2():
        def function_definition(self): ...
        assignment = 1
    def f2(self) -> str: ...
```

In the stable formatting, we have a blank line sometimes, not depending on the previous statement on the same level, but on the last (potentially nested) statement in the previous body.

#2783/#3564 fixes this for classes in preview style:

```python
import sys

if sys.version_info > (3, 7):
    class Nested1:
        assignment = 1
        def function_definition(self): ...

    def f1(self) -> str: ...

    class Nested2:
        def function_definition(self): ...
        assignment = 1

    def f2(self) -> str: ...

if sys.version_info > (3, 7):
    def nested1():
   ... (continued)

5 of 5 new or added lines in 3 files covered. (100.0%)

6600 of 6838 relevant lines covered (96.52%)

3.86 hits per line

Jobs
ID Job ID Ran Files Coverage
1 py3.10-ubuntu-latest - 6128207494.1 09 Sep 2023 01:59AM UTC 34
96.45
2 py3.9-ubuntu-latest - 6128207494.2 09 Sep 2023 01:59AM UTC 34
96.4
3 py3.8-ubuntu-latest - 6128207494.3 09 Sep 2023 01:59AM UTC 34
96.4
4 py3.11-ubuntu-latest - 6128207494.4 09 Sep 2023 01:59AM UTC 34
96.46
Source Files on build 6128207494
  • Tree
  • List 34
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • b40b01ff on github
  • Prev Build on main (#6123072603)
  • Next Build on main (#6129106502)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc