Skip to content

Commit 912ab82

Browse files
authored
Feature/v2 (#69)
* Add v2 first commit * Add tests * Fix travis settings * Fix refer to 1.0.0 * Fix python settings * Fix report * Fix tests path * Fix remove cd command * Update .gitignore
1 parent cbea45b commit 912ab82

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+849
-1511
lines changed

.gitignore

Lines changed: 180 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,183 @@
1-
.swp
1+
### https://raw.github.com/github/gitignore/85bf08b19a77c62d7b6286c2db8811f2ff373b0f/Global/Vim.gitignore
2+
3+
# Swap
4+
[._]*.s[a-v][a-z]
5+
!*.svg # comment out if you don't need vector files
6+
[._]*.sw[a-p]
7+
[._]s[a-rt-v][a-z]
8+
[._]ss[a-gi-z]
9+
[._]sw[a-p]
10+
11+
# Session
12+
Session.vim
13+
Sessionx.vim
14+
15+
# Temporary
16+
.netrwhist
217
*~
3-
.DS_Store
18+
# Auto-generated tag files
419
tags
20+
# Persistent undo
21+
[._]*.un~
22+
23+
24+
### https://raw.github.com/github/gitignore/85bf08b19a77c62d7b6286c2db8811f2ff373b0f/Python.gitignore
25+
26+
# Byte-compiled / optimized / DLL files
27+
__pycache__/
28+
*.py[cod]
29+
*$py.class
30+
31+
# C extensions
32+
*.so
33+
34+
# Distribution / packaging
35+
.Python
36+
build/
37+
develop-eggs/
38+
dist/
39+
downloads/
40+
eggs/
41+
.eggs/
42+
lib/
43+
lib64/
44+
parts/
45+
sdist/
46+
var/
47+
wheels/
48+
pip-wheel-metadata/
49+
share/python-wheels/
50+
*.egg-info/
51+
.installed.cfg
52+
*.egg
53+
MANIFEST
54+
55+
# PyInstaller
56+
# Usually these files are written by a python script from a template
57+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
58+
*.manifest
59+
*.spec
60+
61+
# Installer logs
62+
pip-log.txt
63+
pip-delete-this-directory.txt
64+
65+
# Unit test / coverage reports
66+
htmlcov/
67+
.tox/
68+
.nox/
69+
.coverage
70+
.coverage.*
71+
.cache
72+
nosetests.xml
73+
coverage.xml
74+
*.cover
75+
.hypothesis/
76+
.pytest_cache/
77+
78+
# Translations
79+
*.mo
80+
*.pot
81+
82+
# Django stuff:
83+
*.log
84+
local_settings.py
85+
db.sqlite3
86+
db.sqlite3-journal
87+
88+
# Flask stuff:
89+
instance/
90+
.webassets-cache
91+
92+
# Scrapy stuff:
93+
.scrapy
94+
95+
# Sphinx documentation
96+
docs/_build/
97+
98+
# PyBuilder
99+
target/
100+
101+
# Jupyter Notebook
102+
.ipynb_checkpoints
103+
104+
# IPython
105+
profile_default/
106+
ipython_config.py
107+
108+
# pyenv
109+
.python-version
110+
111+
# pipenv
112+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
113+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
114+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
115+
# install all needed dependencies.
116+
#Pipfile.lock
117+
118+
# celery beat schedule file
119+
celerybeat-schedule
120+
121+
# SageMath parsed files
122+
*.sage.py
123+
124+
# Environments
125+
.env
126+
.venv
127+
env/
128+
venv/
129+
ENV/
130+
env.bak/
131+
venv.bak/
132+
133+
# Spyder project settings
134+
.spyderproject
135+
.spyproject
136+
137+
# Rope project settings
138+
.ropeproject
139+
140+
# mkdocs documentation
141+
/site
142+
143+
# mypy
144+
.mypy_cache/
145+
.dmypy.json
146+
dmypy.json
147+
148+
# Pyre type checker
149+
.pyre/
150+
151+
152+
### https://raw.github.com/github/gitignore/85bf08b19a77c62d7b6286c2db8811f2ff373b0f/Global/macOS.gitignore
153+
154+
# General
155+
.DS_Store
156+
.AppleDouble
157+
.LSOverride
158+
159+
# Icon must end with two \r
160+
Icon
161+
162+
# Thumbnails
163+
._*
164+
165+
# Files that might appear in the root of a volume
166+
.DocumentRevisions-V100
167+
.fseventsd
168+
.Spotlight-V100
169+
.TemporaryItems
170+
.Trashes
171+
.VolumeIcon.icns
172+
.com.apple.timemachine.donotpresent
173+
174+
# Directories potentially created on remote AFP share
175+
.AppleDB
176+
.AppleDesktop
177+
Network Trash Folder
178+
Temporary Items
179+
.apdisk
180+
181+
# App
182+
doq
5183
vader.vim/

.travis.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
sudo: false
2-
dist: trusty
1+
dist: bionic
32
language: vim
43

54
install:
65
- pwd
7-
- git clone https://github.com/junegunn/vader.vim.git test/vader.vim
6+
- git clone https://github.com/junegunn/vader.vim.git tests/vader.vim
87
- git clone https://github.com/vim/vim /tmp/vim
98
- mkdir ~/tmp
109
- cd /tmp/vim
@@ -13,12 +12,15 @@ install:
1312
- make && make install
1413
- git clone https://github.com/junegunn/vader.vim.git
1514
- export VIM_EXE=$HOME/tmp/vim/bin/vim
15+
- sudo apt-get install python3
16+
- sudo apt-get install python3-dev
17+
- sudo apt-get install python3-venv
1618
- cd $HOME/build/heavenshell/vim-pydocstring
19+
- make install
1720

1821
before_script:
1922
- $HOME/tmp/vim/bin/vim --version
2023

2124
script:
22-
- cd test
23-
- ./run.sh > /dev/null && echo Success || echo Fail
24-
- cd ..
25+
- cd tests
26+
- ./run.sh

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2010-2011, Shinya Ohyanagi.
1+
Copyright (c) 2010-2020, Shinya Ohyanagi.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.PHONY: install
2+
install:
3+
bash lib/install.sh
4+
5+
.PHONY: clean
6+
clean:
7+
rm -rf lib/doq lib/venv

README.rst

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,48 @@ Pydocstring is a generator for Python docstrings and is capable of automatically
1010

1111
* inserting one-line docstrings
1212
* inserting multi-line docstrings
13-
* inserting comments
1413

1514
This plugin is heavily inspired by `phpdoc.vim <http://www.vim.org/scripts/script.php?script_id=1355>`_ and `sonictemplate.vim <https://github.com/mattn/sonictemplate-vim>`_.
1615

17-
Usage
18-
-----
16+
Install
17+
-------
18+
19+
Since version 2, pydocstring requires `doq <https://pypi.org/project/doq/>`_.
20+
21+
You can install following command.
22+
23+
.. code::
24+
25+
$ make install
26+
27+
If you want install doq manually, you can install from PyPi.
28+
29+
.. code::
30+
31+
$ python3 -m venv ./venv
32+
$ ./venv/bin/pip3 install doq
33+
34+
Than set installed `doq <https://pypi.org/project/doq/>`_. path to `g:pydocstring_doq_path`.
35+
36+
37+
Note
38+
~~~~
39+
40+
pydocstring is now support only Vim8.
41+
If you want use old version checkout `1.0.0 <https://github.com/heavenshell/vim-pydocstring/releases/tag/1.0.0>`_
42+
43+
Basic usage
44+
-----------
1945

2046
1. Move your cursor on a `def` or `class` keyword line,
21-
2. type `:Pydocstring` or enter `<C-l>` (default keymapping) and
47+
2. type `:Pydocstring` and
2248
3. watch a docstring template magically appear below the current line
2349

50+
Format all
51+
----------
52+
53+
type `:PydocstringFormat` will insert all docstrings to current buffer.
54+
2455
Settings
2556
--------
2657
Pydocstring depends on ``softtabstop``.
@@ -40,3 +71,12 @@ If you want change default keymapping, set following to your `.vimrc`.
4071
.. code::
4172
4273
nmap <silent> <C-_> <Plug>(pydocstring)
74+
75+
Custom template
76+
---------------
77+
78+
You can set custom template
79+
80+
.. code::
81+
82+
let g:pydocstring_template_path = '/path/to/custom/templates'

assets/vim-pydocstring.gif

-1.95 MB
Loading

0 commit comments

Comments
 (0)