Docformatter
conflict with isort
#203
Labels
C: convention
Relates to docstring format convention
P: bug
PEP 257 violation or existing functionality that doesn't work as documented
Hi!
Description
I recently update docformatter
v1.6.0
->v1.6.4
and actions on my project was failed.After spending time searching, reason turned out to be following -
isort
anddocformatter
make opposite changes to the file:docformatter
- remove empty line between import and constant commentisort
- add this lineAlso was checked
v1.6.1
,v1.6.2
andv1.6.3
- they have same problem.As I see it, PEP8 says:
I think this applies to constants as well, so
docformatter
shouldn't remove that line.Reproduction
You can reproduce my problem with next data:
Python code:
.pre-commit-config.yaml
:After run
pre-commit run --all-files
you will see that file changed twice and actions was failed:import os from typing import Iterator - """Don't remove this comment, it's cool.""" IMPORTANT_CONSTANT = "potato"
import os from typing import Iterator + """Don't remove this comment, it's cool.""" IMPORTANT_CONSTANT = "potato"
The text was updated successfully, but these errors were encountered: