-
Notifications
You must be signed in to change notification settings - Fork 50
Conversation
API Developer Docs Preview: Ready https://wordpress.github.io/openverse-api/_preview/1006 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. |
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.
Cleaner look is always welcome :)
@@ -52,7 +52,7 @@ def _unmasked_query_end(page_size, page): | |||
|
|||
def _paginate_with_dead_link_mask( | |||
s: Search, page_size: int, page: int | |||
) -> Tuple[int, int]: | |||
) -> tuple[int, int]: |
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.
Interesting that it replaces the types this way!
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.
I like that it saves imports 😄
@@ -19,6 +21,7 @@ repos: | |||
args: | |||
- --remove | |||
- id: pretty-format-json | |||
exclude: package(-lock)?\.json |
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.
Would this affect tsconfig.json
in any way?
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.
This isn't being synced with the frontend yet. There are some repo-specific hooks in the frontend so syncing them centrally is not feasible (yet).
f1d90e9
to
ca2f455
Compare
ca2f455
to
c1c9e89
Compare
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.
Love the syntax standardization across Repos ✨
.git-blame-ignore-revs
Outdated
@@ -0,0 +1,2 @@ | |||
# Add pyupgrade | |||
5158c579d0c8eeb6e9372b30a03ce48f53459958 |
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.
I wonder if this does something after squashing 💭
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.
You're completely right, that'll not work!
@@ -52,7 +52,7 @@ def _unmasked_query_end(page_size, page): | |||
|
|||
def _paginate_with_dead_link_mask( | |||
s: Search, page_size: int, page: int | |||
) -> Tuple[int, int]: | |||
) -> tuple[int, int]: |
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.
I like that it saves imports 😄
from typing import Iterable | ||
from collections.abc import Iterable |
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.
Interesting change 😮
res_2_ids = set(result["id"] for result in data_without_dead_links["results"]) | ||
res_1_ids = {result["id"] for result in data_with_dead_links["results"]} |
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.
Here I kind of like that the set()
is more explicit as the {}
could be confused by a dictionary if one doesn't pay attention, but I guess it is acceptable.
Fixes
Addresses WordPress/openverse#316 by @dhruvkb
Description
This PR uses the new pre-commit config introduced in WordPress/openverse#330 and fixes the code so that the lint checks pass.
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin