Closed ioreshnikov closed 2 years ago
Ah, now I see it was discussed in #21 some years ago :)
On the other, one of the major motivations for this mode to exist is to avoid projects having diff noise when people have different configurations for re-wrapping docstrings.
That's a valid point, but as I said, the major mode respects sentence-end-double-space
, so I advocate we should do the same in the docstrings for consistency's sake.
Thanks @ioreshnikov !
This makes sense from a personal-preference perspective, but I think that customization at the level of Emacs is generally the wrong place for this. I think I might actually want to remove python-docstring-sentence-end-double-space
entirely, and instead find a configuration file local to the project, so that formatting is done consistently.)
I could be convinced that this is a reasonable default to draw from in some context, but I'd want to make sure that projects at least have the ability to enforce stability before making this honor a variable that might be set for other reasons.
Thanks very much for contributing, but having had half a year to consider, I think I'm going to reject this now.
I am on the fence about this diff.
On one hand, PEP8 explicitly suggests one uses double spaces after the sentence end in a comment, so
t
might indeed be a good default.On the other, when a user has explicitly set up a global
sentence-end-double-space
tonil
, it's probably a good idea to respect this setting in a docstring by default.python-mode
seems to be respecting this default out of the box, so seeing a different behavior inside a docstring was an unpleasant surprise.Best, Ivan