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

assert in url dedup #337

Open
jordane95 opened this issue Feb 6, 2025 · 2 comments
Open

assert in url dedup #337

jordane95 opened this issue Feb 6, 2025 · 2 comments

Comments

@jordane95
Copy link
Contributor

# 0 will stay as is, so we can't use 0 as a priority
assert all(
sig[1] >= 1 and sig[1] <= priority_max for sig in signatures
), f"priority must be between 1 and {priority_max}"

I do not understand why we cannot use 0 as priority. Actually in the function provided by the example script, some doc will have a priority of 0 if len < 4.

@guipenedo
Copy link
Collaborator

Didn't have time to look too in depth but I think the numbers in question are unsigned so priority 0 would come first when you flip

@hynky1999
Copy link
Contributor

hynky1999 commented Feb 6, 2025

EDIT: Actually I think you are right, it should be fine if it's zero.

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

3 participants