Skip to content

Rewrite Function.__init__()#240

Merged
avalentino merged 1 commit intoliberfa:mainfrom
eerovaher:Function-init-refactor
May 5, 2026
Merged

Rewrite Function.__init__()#240
avalentino merged 1 commit intoliberfa:mainfrom
eerovaher:Function-init-refactor

Conversation

@eerovaher
Copy link
Copy Markdown
Contributor

The main reason for editing Function.__init__() was that the cfunc and ret attributes of Function instances were never used outside __init__() so there was no reason to store them. Then it turned out that cfunc could be eliminated entirely with better regexes, and then I ended up rewriting the entire thing. The changes do not cause any differences in the files erfa_generator creates.

The `cfunc` and `ret` attributes of `Function` instances were only used
in `Function.__init__()`, so there was no reason to have them as
attributes. Additionally, if `Function.__init__()` cannot find the
function definition (but it can find the file that should contain it)
then the error it raises is now much more informative.
@avalentino avalentino merged commit ffee4c6 into liberfa:main May 5, 2026
28 checks passed
@eerovaher eerovaher deleted the Function-init-refactor branch May 5, 2026 10:12
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