-
Notifications
You must be signed in to change notification settings - Fork 15
handle excluded policy breaks #118
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
Conversation
e0befb9 to
a0c1ea9
Compare
|
We could validate that |
a0c1ea9 to
e1c8faa
Compare
changelog.d/20241014_101918_mathias.millet_handle_excluded_policy_breaks.md
Outdated
Show resolved
Hide resolved
7351154 to
90a4f88
Compare
|
I will also need to make changes to the client, but I'll wait for the feature to be at least available in staging. |
0922fe2 to
97e8106
Compare
@agateau-gg added the parameters to the client, should be ready now. |
agateau-gg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
pygitguardian/client.py
Outdated
| self, | ||
| document: str, | ||
| filename: Optional[str] = None, | ||
| all_secrets: Optional[bool] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move the new argument at the end? If we don't then we break the API if the function is passed a value for extra_headers without using a keyword argument for it.
Actually it would be a good idea to add a *, after extra_headers so that we don't have this issue with future arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about multi_content_scan ? Should I make ignore_known_secrets mandatory kwarg ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made it like that for now, so as not to introduce breaking changes:
ignore_known_secrets: Optional[bool] = None,
*,
all_secrets: Optional[bool] = None,There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense 👍
1749b17 to
5170e1d
Compare
5170e1d to
f3cbef0
Compare
agateau-gg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
load_defaultforincident_url(Noneinstead ofFalse)A bit bothered by using two fields, but using a single
exclude_reasondoes not seem right either.