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

Naming of results if there are multiple #138

Closed
lars-reimann opened this issue May 16, 2024 · 0 comments · Fixed by #155
Closed

Naming of results if there are multiple #138

lars-reimann opened this issue May 16, 2024 · 0 comments · Fixed by #155
Assignees
Labels
bug 🪲 Something isn't working

Comments

@lars-reimann
Copy link
Member

Describe the bug

If a function has multiple results, they are called result1, result2, etc. in the stubs despite the existence of names in the docstring.

Example (fit_and_transform):

/**
 * ...
 *
 * @result fittedTransformer The fitted transformer.
 * @result transformedTable The transformed table.
 */
@Pure
@PythonName("fit_and_transform")
fun fitAndTransform(
    table: Table,
    @PythonName("column_names") columnNames: List<String>? = null
) -> (result1: TableTransformer, result2: Table)

To Reproduce

Generate stubs for safe-ds.

Expected behavior

Results should be named as they are in the docstring.

Screenshots (optional)

No response

Additional Context (optional)

No response

@lars-reimann lars-reimann added the bug 🪲 Something isn't working label May 16, 2024
@lars-reimann lars-reimann changed the title Naming of result if there are multiple Naming of results if there are multiple May 16, 2024
@Masara Masara moved this from Backlog to Ready for Review in Library Analysis Jun 16, 2024
@Masara Masara linked a pull request Jun 16, 2024 that will close this issue
lars-reimann pushed a commit that referenced this issue Jun 18, 2024
Closes #138

### Summary of Changes

If number of results and docstrings types correspond then docstring
names are taken for the results.
@github-project-automation github-project-automation bot moved this from Ready for Review to ✔️ Done in Library Analysis Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
Status: ✔️ Done
Development

Successfully merging a pull request may close this issue.

2 participants