Skip to content

Commit 15b02a9

Browse files
authored
Fix can use relative path (#84)
* Fix can use relative path * Fix add changelog
1 parent 70e8ce2 commit 15b02a9

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

CHANGES.rst

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
Version 2.2.0
22
-------------
33

4-
Released on Mar 14th 2020
4+
Released on Mar 31th 2020
5+
6+
- Fix can use relative path
7+
8+
see https://github.com/heavenshell/vim-pydocstring/issues/82
9+
10+
Thx @Trashcleaner
511

612
- Add exception feature
713

README.rst

-3
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,9 @@ Custom template
8787

8888
You can set custom template. See `example <https://github.com/heavenshell/py-doq/tree/master/examples>`_.
8989

90-
Path should be absolute path.
91-
9290
.. code::
9391
9492
let g:pydocstring_template_path = '/path/to/custom/templates'
95-
let g:pydocstring_template_path = expand('~/path/to/custom/templates')
9693
9794
Exceptions
9895
----------

autoload/pydocstring.vim

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function! s:exit_callback(ch, msg) abort
7878
endfunction
7979

8080
function! s:execute(cmd, lines, indent, start_lineno, cb, ex_cb) abort
81-
if !executable(g:pydocstring_doq_path)
81+
if !executable(expand(g:pydocstring_doq_path))
8282
redraw
8383
echohl Error
8484
echo '`doq` not found. Install `doq`.'
@@ -106,15 +106,15 @@ function! s:create_cmd(style, omissions) abort
106106
if a:omissions ==# ''
107107
let cmd = printf(
108108
\ '%s --style=%s --formatter=%s --indent=%s',
109-
\ g:pydocstring_doq_path,
109+
\ expand(g:pydocstring_doq_path),
110110
\ a:style,
111111
\ g:pydocstring_formatter,
112112
\ &softtabstop
113113
\ )
114114
else
115115
let cmd = printf(
116116
\ '%s --style=%s --formatter=%s --omit=%s --indent=%s',
117-
\ g:pydocstring_doq_path,
117+
\ expand(g:pydocstring_doq_path),
118118
\ a:style,
119119
\ g:pydocstring_formatter,
120120
\ a:omissions,

doc/pydocstring.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,11 @@ pydocstring_formatter *g:pydocstring_formatter*
185185
Default value is 'sphinx'
186186

187187
g:pydocstring_templates_path *g:pydocstring_templates_path*
188-
Absolute path to your own template file.
188+
Path to your own template file.
189189
Refer template/pydocstring/ about the default value.
190190

191191
g:pydocstring_doq_path *g:pydocstring_doq_path*
192-
Absolute path to doq command.
192+
Path to doq command.
193193
Default value is 'lib/doq'
194194

195195
g:pydocstring_enable_mapping *g:pydocstring_enable_mapping*

ftplugin/python/pydocstring.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" File: pydocstring.vim
22
" Author: Shinya Ohyanagi <[email protected]>
3-
" Version: 2.0.0
3+
" Version: 2.2.0
44
" WebPage: http://github.com/heavenshell/vim-pydocstriong/
55
" Description: Generate Python docstring to your Python script file.
66
" License: BSD, see LICENSE for more details.

0 commit comments

Comments
 (0)