File tree Expand file tree Collapse file tree 4 files changed +144
-6
lines changed Expand file tree Collapse file tree 4 files changed +144
-6
lines changed Original file line number Diff line number Diff line change 1
- * .pyc
2
- /MANIFEST
3
- /build /
4
1
/deb_dist /
5
- /dist /
2
+
3
+ # Python.gitignore:
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__ /
6
+ * .py [cod ]
7
+ * $py.class
8
+
9
+ # C extensions
10
+ * .so
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ build /
15
+ develop-eggs /
16
+ dist /
17
+ downloads /
18
+ eggs /
19
+ .eggs /
20
+ lib /
21
+ lib64 /
22
+ parts /
23
+ sdist /
24
+ var /
25
+ wheels /
26
+ pip-wheel-metadata /
27
+ share /python-wheels /
28
+ * .egg-info /
29
+ .installed.cfg
30
+ * .egg
31
+ MANIFEST
32
+
33
+ # PyInstaller
34
+ # Usually these files are written by a python script from a template
35
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
36
+ * .manifest
37
+ * .spec
38
+
39
+ # Installer logs
40
+ pip-log.txt
41
+ pip-delete-this-directory.txt
42
+
43
+ # Unit test / coverage reports
44
+ htmlcov /
45
+ .tox /
46
+ .nox /
47
+ .coverage
48
+ .coverage. *
49
+ .cache
50
+ nosetests.xml
51
+ coverage.xml
52
+ * .cover
53
+ .hypothesis /
54
+ .pytest_cache /
55
+
56
+ # Translations
57
+ * .mo
58
+ * .pot
59
+
60
+ # Django stuff:
61
+ * .log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance /
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs /_build /
75
+
76
+ # PyBuilder
77
+ target /
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default /
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ .python-version
88
+
89
+ # pipenv
90
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
91
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
92
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
93
+ # install all needed dependencies.
94
+ # Pipfile.lock
95
+
96
+ # celery beat schedule file
97
+ celerybeat-schedule
98
+
99
+ # SageMath parsed files
100
+ * .sage.py
101
+
102
+ # Environments
103
+ .env
104
+ .venv
105
+ env /
106
+ venv /
107
+ ENV /
108
+ env.bak /
109
+ venv.bak /
110
+
111
+ # Spyder project settings
112
+ .spyderproject
113
+ .spyproject
114
+
115
+ # Rope project settings
116
+ .ropeproject
117
+
118
+ # mkdocs documentation
119
+ /site
120
+
121
+ # mypy
122
+ .mypy_cache /
123
+ .dmypy.json
124
+ dmypy.json
125
+
126
+ # Pyre type checker
127
+ .pyre /
Original file line number Diff line number Diff line change 33
33
scripts = [
34
34
'scripts/vimdoc' ,
35
35
],
36
+ extras_require = {'completion' : ['shtab' ]},
36
37
package_data = {'vimdoc' : ['VERSION.txt' ]},
37
38
classifiers = [
38
39
'Development Status :: 3 - Alpha' ,
Original file line number Diff line number Diff line change
1
+ FILE = None
2
+ DIRECTORY = DIR = None
3
+
4
+
5
+ def add_argument_to (parser , * args , ** kwargs ):
6
+ from argparse import Action
7
+ Action .complete = None # type: ignore
8
+ return parser
Original file line number Diff line number Diff line change 3
3
4
4
import vimdoc
5
5
6
+ try :
7
+ import shtab
8
+ except ImportError :
9
+ from . import _shtab as shtab
10
+
6
11
7
12
def Source (path ):
8
13
if not os .path .isdir (path ):
@@ -11,7 +16,9 @@ def Source(path):
11
16
raise argparse .ArgumentTypeError ('Cannot access {}' .format (path ))
12
17
return path
13
18
14
- parser = argparse .ArgumentParser (description = 'Generate vim helpfiles' )
15
- parser .add_argument ('plugin' , type = Source , metavar = 'PLUGIN' )
19
+
20
+ parser = argparse .ArgumentParser ('vimdoc' , description = 'Generate vim helpfiles' )
21
+ shtab .add_argument_to (parser )
22
+ parser .add_argument ('plugin' , type = Source , metavar = 'PLUGIN' ).complete = shtab .DIR
16
23
parser .add_argument ('--version' , action = 'version' ,
17
24
version = '%(prog)s ' + vimdoc .__version__ )
You can’t perform that action at this time.
0 commit comments