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

Incorrect doc of cedar_policy::Policy::annotation #1383

Open
1 of 2 tasks
shaobo-he-aws opened this issue Dec 19, 2024 · 2 comments
Open
1 of 2 tasks

Incorrect doc of cedar_policy::Policy::annotation #1383

shaobo-he-aws opened this issue Dec 19, 2024 · 2 comments
Labels
internal-improvement Refactoring, minor performance improvement, or other changes that Cedar users may never notice

Comments

@shaobo-he-aws
Copy link
Contributor

Describe the improvement you'd like to request

The comment says that this function returns None only when the annotation is not present, which is not the case. It can also return None when the argument is not a valid Id.

IMO, we should change the signature of this function for the next major release and at least fix the comment now.

Describe alternatives you've considered

N/A

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this internal improvement
  • ⚠️ This feature might incur a breaking change
@shaobo-he-aws shaobo-he-aws added pending-triage The cedar maintainers haven't looked at this yet. Automicaly added to all new issues. internal-improvement Refactoring, minor performance improvement, or other changes that Cedar users may never notice labels Dec 19, 2024
@john-h-kastner-aws
Copy link
Contributor

good catch. It's also missing a period between policy and If

@john-h-kastner-aws
Copy link
Contributor

and the comment on the function below needs a period between policy and Annotations

@shaobo-he-aws shaobo-he-aws removed the pending-triage The cedar maintainers haven't looked at this yet. Automicaly added to all new issues. label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal-improvement Refactoring, minor performance improvement, or other changes that Cedar users may never notice
Projects
None yet
Development

No branches or pull requests

2 participants