Skip to content

Fix 1004 - add function body upon call to add_fct#1006

Merged
ColinFay merged 2 commits intoThinkR-open:devfrom
ilyaZar:1005-add-fct-body
Mar 29, 2023
Merged

Fix 1004 - add function body upon call to add_fct#1006
ColinFay merged 2 commits intoThinkR-open:devfrom
ilyaZar:1005-add-fct-body

Conversation

@ilyaZar
Copy link
Copy Markdown
Contributor

@ilyaZar ilyaZar commented Mar 24, 2023

Per commit message:

So add_module(fct = "fct_name") creates a file "fct_name" without pulling above template. This could be fixed, though I am not sure what the exact behavior should be. #1004 explicitly asks for changing add_fct() not add_module().

The body is a matter of taste, I am happy to change it :)

- fix 1004 adding bare skeleton function body
- function name taken from 'name' arg to add_fct
@ColinFay
Copy link
Copy Markdown
Member

Thanks a lot @ilyaZar!

For the body, my general philosophy is: "if you have to remove something every time, you probably need to prevent it from being added in the first place" :) So yeah I would prefer an empty body & params if that's ok with you to make the change ?

@ilyaZar
Copy link
Copy Markdown
Contributor Author

ilyaZar commented Mar 24, 2023

That makes sense!

@ColinFay ColinFay merged commit 97b31e6 into ThinkR-open:dev Mar 29, 2023
@ColinFay
Copy link
Copy Markdown
Member

Thanks!

@ilyaZar ilyaZar deleted the 1005-add-fct-body branch April 2, 2023 13:10
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