pydocstringformatter
pydocstringformatter copied to clipboard
fix issue where passing two styles would fail with index error
Fixes the first section of:
Closes https://github.com/DanielNoord/pydocstringformatter/issues/160
According to the primer, this change has no effect on the checked open source code. π€π
According to the primer, this change has no effect on the checked open source code. π€π
Codecov Report
Merging #162 (edf4976) into main (9268fd6) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## main #162 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 591 592 +1
=========================================
+ Hits 591 592 +1
Impacted Files | Coverage Ξ | |
---|---|---|
pydocstringformatter/_formatting/base.py | 100.00% <100.00%> (ΓΈ) |
|
...stringformatter/_formatting/formatters_numpydoc.py | 100.00% <100.00%> (ΓΈ) |
Tests fail due to the auto-fix from pre-commit.ci 0c6795b437e01d62e2134eb8efd6099b59e54777 ... which raises the question ... why is it generating those trailing whitespaces?
- Should a "two pass" approach be done?
- Should there be an "Extras" where everything that was not placed in a section would go?
- Should a "two pass" approach be done?
I have been thinking about this as well, but not sure if we should do that as we can create infinite loops.
Those trailing whitespaces seem to match the previous indentation. I think that is a bug and should only be a new line without the extra spacing.
According to the primer, this change has no effect on the checked open source code. π€π
According to the primer, this change has no effect on the checked open source code. π€π
@DanielNoord What about this behavior? Where there is a section separator but no name. I think it makes clear that the parser was not able to assign what is under it to any section and not that it is part of the former.
Those trailing whitespaces seem to match the previous indentation. I think that is a bug and should only be a new line without the extra spacing.
According to the primer, this change has no effect on the checked open source code. π€π
@DanielNoord
- Should a "two pass" approach be done?
I have been thinking about this as well, but not sure if we should do that as we can create infinite loops.
Those trailing whitespaces seem to match the previous indentation. I think that is a bug and should only be a new line without the extra spacing.
Thinking about this ... I started working a branch that does a two pass to check the stability of the tokens. I will reference it in a new issue.
Was this replaced by #169 @jspaezp ? (Should we close ?)
Hello @Pierre-Sassoulas! sorry for not closing this issue before (just for the future, it was fixed here https://github.com/DanielNoord/pydocstringformatter/pull/163)
No problem, thank you for answering :) !
I do think this test still fails on main
? At least it did last time I checked after we merged #163.
Edit: this does indeed still reproduce.
According to the primer, this change has no effect on the checked open source code. π€π