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

Use of the "source" string throughout the Anod class. #614

Open
grouigrokon opened this issue Jul 24, 2023 · 2 comments
Open

Use of the "source" string throughout the Anod class. #614

grouigrokon opened this issue Jul 24, 2023 · 2 comments

Comments

@grouigrokon
Copy link
Contributor

There are numerous tests in the Anod class (e3/anod/spec.py) which refer to a "source" string.

There is a SOURCE_PRIMITIVE (which could be defined out of the TYPE_CHECKING) which could be used.

The Anod class could define an is_source property like:

@property
def is_source(self) -> bool:
    return self.kind == SOURCE_PRIMITIVE
@enzbang
Copy link
Member

enzbang commented Sep 11, 2023

note that we should avoid having too many properties / methods in Anod given that this pollutes all specs

@grouigrokon
Copy link
Contributor Author

You mean inherit ;)
Five uses of == "source" in python files.
Two uses of == "source" in anod files.
No anod file defines is_source.
If you think this is not enough to create a property, I may close the bug.

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

2 participants