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 sentinel object #1

Closed
PythonFZ opened this issue Aug 28, 2024 · 0 comments · Fixed by #5
Closed

Use sentinel object #1

PythonFZ opened this issue Aug 28, 2024 · 0 comments · Fixed by #5

Comments

@PythonFZ
Copy link
Member

PythonFZ commented Aug 28, 2024

_GETTER = "znfields.getter"

Use a sentinel object instead of a string to ensure uniqueness. Allow imports by not making it private.

class _ZNFIELDS_GETTER_TYPE:
    pass

ZNFIELDS_GETTER_TYPE = _ZNFIELDS_GETTER_TYPE()
@PythonFZ PythonFZ linked a pull request Oct 3, 2024 that will close this issue
PythonFZ added a commit that referenced this issue Oct 3, 2024
* add CI and test changing a parameter

* bump version

* publish action

* badge

* use sentinel (fix Use sentinel object  #1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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 a pull request may close this issue.

1 participant