Stubs: Different behavior inside "if version_check" blocks #1060
Labels
F: empty lines
Wasting vertical space efficiently.
S: accepted
The changes in this design / enhancement issue have been accepted and can be implemented
T: enhancement
New feature or request
Operating system: Debian buster
Python version: 3.7.3
Black version: 19.3b0
Does also happen on master: yes
We are currently looking into reformatting typeshed with black. One snag I ran into is in the following example:
Reformatting this with black removes the empty line between the class and the function inside the "if" block, but not outside it:
This causes some sub-module that are basically one big "if" block (since they were added in later Python versions) to be very "dense". One example is: https://github.com/python/typeshed/blob/c90b41bb230121a20e18da3adf772da1d03f7ab4/stdlib/3/importlib/metadata.pyi
The text was updated successfully, but these errors were encountered: