Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Fix --source flag (#536)
Browse files Browse the repository at this point in the history
* fix --source

* update release_notes.rst
  • Loading branch information
RuRo committed May 17, 2021
1 parent cf29c32 commit 6a4fed9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/release_notes.rst
Expand Up @@ -8,6 +8,9 @@ Release Notes
Current Development Version
---------------------------

Bug Fixes

* Split ``--source`` by lines instead of by characters (#536).

6.1.0 - May 17th, 2021
---------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/pydocstyle/violations.py
Expand Up @@ -63,7 +63,7 @@ def lines(self) -> str:
if self.definition is None:
return ''
source = ''
lines = self.definition.source
lines = self.definition.source.splitlines(keepends=True)
offset = self.definition.start # type: ignore
lines_stripped = list(
reversed(list(dropwhile(is_blank, reversed(lines))))
Expand Down

0 comments on commit 6a4fed9

Please sign in to comment.