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

doc: suppression examples would be better using List[NagPackSuppression] #583

Closed
mrgum opened this issue Jan 24, 2022 · 7 comments
Closed
Labels
documentation Improvements or additions to documentation stale

Comments

@mrgum
Copy link

mrgum commented Jan 24, 2022

Describe your issue?

The suppression examples use List[dict] rather than List[NagPackSuppression]

For example "Example 1) Default Construct" has

NagSuppressions.add_resource_suppressions(test, [id="AwsSolutions-EC23", reason="lorem ipsum"])

when

NagSuppressions.add_resource_suppressions(test, [NagPackSuppression(id="AwsSolutions-EC23", reason="lorem ipsum")])

would seem to be better

I'd be happy to spend the time changing these if its accepted

@mrgum mrgum added documentation Improvements or additions to documentation needs-triage This issue or PR still needs to be triaged. labels Jan 24, 2022
@mrgum mrgum changed the title doc: short issue description doc: suppression examples would be better using List[NagPackSuppression] Jan 24, 2022
@dontirun
Copy link
Collaborator

Hi! Can you provide a link to the documentation that you're referencing?

If you're referencing the python documentation, it is auto-converted from the TypeScript example documentation using jsii and may contain errors

@mrgum
Copy link
Author

mrgum commented Jan 24, 2022

@dontirun dontirun removed the needs-triage This issue or PR still needs to be triaged. label Jan 24, 2022
@dontirun
Copy link
Collaborator

That is a valid example for TypeScript since the NagPackSuppression type is inferred. We would have to look to see if there are any ways to influence the python documentation generated by jsii.

@mrgum
Copy link
Author

mrgum commented Jan 24, 2022

Would asserting the type help the generation?
NagSuppressions.addResourceSuppressions(test, [
{
id: 'AwsSolutions-EC23', reason: 'lorem ipsum'
},
]);

@dontirun
Copy link
Collaborator

I think we would need to do something like this aws/jsii#826

@github-actions
Copy link

This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon.

@github-actions github-actions bot added the stale label Mar 26, 2022
@github-actions
Copy link

github-actions bot commented Apr 2, 2022

Closing this issue as it hasn't seen activity for a while. Please add a comment @mentioning a maintainer to reopen.

@github-actions github-actions bot closed this as completed Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation stale
Projects
None yet
Development

No branches or pull requests

2 participants