Skip to content

Lambda-like support for callbacks#33

Merged
ObaraEmmanuel merged 11 commits intoObaraEmmanuel:masterfrom
KavyanshKhaitan2:master
May 29, 2024
Merged

Lambda-like support for callbacks#33
ObaraEmmanuel merged 11 commits intoObaraEmmanuel:masterfrom
KavyanshKhaitan2:master

Conversation

@KavyanshKhaitan2
Copy link
Copy Markdown
Contributor

Added rich callback support for callbacks. This should still keep most of the uses still working except the ones with spaces in them.

Also adding more documentation for the above feature.

Issues resolved: #32

Added rich callback support for callbacks. This should still keep most of the uses still working except the ones with spaces in them.

Also adding more documentation for the above feature.
@KavyanshKhaitan2
Copy link
Copy Markdown
Contributor Author

Some checks didnt pass because i used the f"{varName=}" syntax for testing. So commenting those lines out!
@KavyanshKhaitan2
Copy link
Copy Markdown
Contributor Author

KavyanshKhaitan2 commented May 25, 2024

Huh. the "workflow tests" failed because I used f"{varName=}" syntax for testing inside if __name__ == "__main__"... So pushed that on by commenting those lines out!

@ObaraEmmanuel
Copy link
Copy Markdown
Owner

Now I remember why I avoided type hinting. It is always changing and not consistent. Your code only works for 3.10 because of the type hinting.

@ObaraEmmanuel
Copy link
Copy Markdown
Owner

I would recommend you drop all type hints for now

@KavyanshKhaitan2
Copy link
Copy Markdown
Contributor Author

I would recommend you drop all type hints for now

see; I wont drop ALL type hinting; I would like to keep some basic type hinting for sure.

Again; pushing a commit...

Removed some type hinting because of runtime errors on older versions of Python.
Made the implementation better, faster, and smaller in size by using a helper function called `parseHelper` which just returns the args and kwargs it recieves.
New docs for the new implementation.
changed camelCase to snake_case for consistency. Also, removed unnecessary functions.
Copy link
Copy Markdown
Owner

@ObaraEmmanuel ObaraEmmanuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have polished up the code. It still does not pass some of the lambda tests I have written locally so I will add some more code to resolve this later in the week. I also intend to change for format from funcname arg1 arg2 ... kwarg1=v kwarg2=v ... to funcname(arg1, arg2,..., kwarg1=v, kwarg2=v, ...) for easier parsing.

@ObaraEmmanuel ObaraEmmanuel merged commit b51f3fc into ObaraEmmanuel:master May 29, 2024
KavyanshKhaitan2 added a commit to KavyanshKhaitan2/ObaraEmmanuel.Formation.PRs that referenced this pull request May 30, 2024
This commit acknowledges some of @ObaraEmmanuel in pull request ObaraEmmanuel#33
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.

[FEATURE] Lambda support in callbacks

2 participants