Skip to content

Commit

Permalink
fix: update offset with kwonlydefaults included
Browse files Browse the repository at this point in the history
  • Loading branch information
dandhlee committed Aug 9, 2024
1 parent feb080c commit 9732d96
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docfx_yaml/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,8 @@ def _update_friendly_package_name(path):
# Find the first index which default arguments start at.
# Every argument after this offset_count all have default values.
offset_count = len(argspec.defaults)
if argspec.kwonlydefaults:
offset_count += len(argspec.kwonlydefaults)
# Find the index of the current default value argument
index = len(args) + count - offset_count

Expand Down

0 comments on commit 9732d96

Please sign in to comment.