I have a problem with the semantic completion for specific class argparse.Namespace
with YouCompleteMe.
Here's a minimal repro case I can provide:
# .vimrc
silent! call plug#begin()
Plug 'ycm-core/YouCompleteMe', { 'do': 'git submodule update --init --recursive && GOFLAGS=-modcacherw ./install.py' }
call plug#end()
set updatetime=1500
let g:ycm_python_binary_path = 'python3'
And then the following python code doesn't have the completion in the last line for the expected repo
, from_repo
, pr_to_sync
and dry_run
expected fields.
#!/usr/bin/env python
import argparse
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
description="dummy",
)
parser.add_argument("--token", help="github token")
parser.add_argument(
"--repo", default="owner/repo1", help="repo owner/name"
)
parser.add_argument(
"--from-repo", default="owner/repo2",
)
parser.add_argument(
"--pr-to-sync",
type=int,
help="if set, only this single PR will be synced",
)
parser.add_argument("--dry-run", action="store_true", help="do not create anything")
args = parser.parse_args()
args.
I feel it requires the runtime. How can I improve the situation?