[Python-modules-commits] [python3-proselint] 01/03: Make proselint work on read-only files
Víctor Cuadrado Juan
viccuad-guest at moszumanska.debian.org
Wed Jun 29 12:15:41 UTC 2016
This is an automated email from the git hooks/post-receive script.
viccuad-guest pushed a commit to branch master
in repository python3-proselint.
commit ea7e07400ae1888c69fda178c815fb6a1b83ce7a
Author: Víctor Cuadrado Juan <me at viccuad.me>
Date: Wed Jun 29 14:09:15 2016 +0200
Make proselint work on read-only files
Open files as read-only instead of read/write, to make Proselint
work with read-only files (such as the provided demo.md, installed
in dist-packages).
---
proselint/command_line.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/proselint/command_line.py b/proselint/command_line.py
index 911af52..8029eaa 100644
--- a/proselint/command_line.py
+++ b/proselint/command_line.py
@@ -189,7 +189,7 @@ def proselint(paths=None, version=None, initialize=None, clean=None,
num_errors = 0
for fp in filepaths:
try:
- f = click.open_file(fp, 'r+', encoding="utf-8")
+ f = click.open_file(fp, 'r', encoding="utf-8")
errors = lint(f, debug=debug)
num_errors += len(errors)
show_errors(fp, errors, output_json, compact=compact)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python3-proselint.git
More information about the Python-modules-commits
mailing list