Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: API params are correctly extracted #67

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Conversation

nikkothari22
Copy link
Member

@nikkothari22 nikkothari22 commented Sep 18, 2024

Earlier, the logic to find the function definition string was to go from the first mention of "def" to the first mention of ":" after the def index.

With type annotations, this means that a function like this

def add(a: int, b:int):

  #Add logic here

would give a function def like: add(a which is incorrect.

Two changes made:

  1. For the ending index, look for ): instead of just the colon since that will signal the end of the function definition.
  2. API Def is extracted until the last index of "):" + 1 to cover the last character.

This ensures that all params are covered.

@nikkothari22 nikkothari22 changed the title fix: API params are correctly loaded fix: API params are correctly extracted Sep 18, 2024
@sumitjain236 sumitjain236 merged commit e9648b7 into main Sep 19, 2024
@sumitjain236 sumitjain236 deleted the fix-api-params branch September 19, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants