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

Allow @constant to apply constants to other modules #40

Open
gselzer opened this issue Jun 7, 2022 · 1 comment
Open

Allow @constant to apply constants to other modules #40

gselzer opened this issue Jun 7, 2022 · 1 comment

Comments

@gselzer
Copy link
Member

gselzer commented Jun 7, 2022

I am finding myself duplicating the constant function to our other python components. This is WET.

It would be cool if, in imglyb, we could write

@scyjava.constant
def some_constant():
  return "the constant"

And then access it with imglyb.some_constant.

@gselzer
Copy link
Member Author

gselzer commented Jun 7, 2022

ctrueden added a commit that referenced this issue Nov 3, 2022
Note that this removes the constant decorator method, which does not
yet work outside of scyjava, and is not currently part of __all__.
At some point in future we might make it work (see #40),
at which point we would add it to __all__ and put it back in the README.
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

No branches or pull requests

1 participant