Keep single line Python function definitions?

I've been a JetBrains user for years and years (primarily PHPStorm) now, but I can't find anywhere to set this in PyCharm.

If I have a piece of code, say:

class Foo:

    def some_func(self): ...

    def other_func(self): raise NotImplementedError


There doesn't seem to be any way to make PyCharm keep these single-line function definitions.  They're being defined like that specifically to save space when there are many function stubs defined for child classes.

PyCharm always formats them to

class Foo:

    def some_func(self):

        ...

    def other_func(self):

        raise NotImplementedError

Which I just don't want... 

No amount of tweaking the code formatting options seems to have any effect on this behavior.

The setting for single-line statements works fine.  Just not functions.

Please sign in to leave a comment.