Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #43 from ericholscher/jinhwa/method_information
Browse files Browse the repository at this point in the history
fix method information: incorrect default value
  • Loading branch information
bianliu1013 committed Jun 16, 2017
2 parents 463f579 + 770c2b5 commit cfdb4ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions docfx_yaml/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def _create_datam(app, cls, module, name, _type, obj, lines=None):
for count, default in enumerate(argspec.defaults):
cut_count = len(argspec.defaults)
# Match the defaults with the count
args[len(args) - 1 - cut_count - 1 - count]['defaultValue'] = str(default)
args[len(args) - cut_count + count]['defaultValue'] = str(default)
except Exception:
print("Can't get argspec for {}: {}".format(type(obj), name))

Expand Down Expand Up @@ -437,9 +437,8 @@ def convert_module_to_package_if_needed(obj):
app.warn(
"Documented params don't match size of params:"
" {}".format(obj['uid']))
if len(arg_params) - len(doc_params) == 1:
if('id' in arg_params[0] and arg_params[0]['id'] == 'self'):
# Support having `self` as an arg param, but not documented
merged_params = [arg_params[0]]
arg_params = arg_params[1:]
for args, docs in zip(arg_params, doc_params):
args.update(docs)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setup(
name='sphinx-docfx-yaml',
version='1.2.3',
version='1.2.4',
author='Eric Holscher',
author_email='eric@ericholscher.com',
url='https://github.com/ericholscher/sphinx-docfx-yaml',
Expand Down

0 comments on commit cfdb4ea

Please sign in to comment.