Skip to content

Commit

Permalink
CI: fix Steam appid check (#148)
Browse files Browse the repository at this point in the history
* CI: fix Steam appid comparison 

It was reversed 🙃

* CI: return set from get_valid_appids
  • Loading branch information
doZennn authored Oct 13, 2024
1 parent 237aaf4 commit b456f81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions .github/scripts/check_gamefixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ def check_steamfixes(project: Path) -> None:
appids = {int(x) for x in appids}

steam_appids = steam.get_valid_appids(appids)

for appid in steam_appids:
if appid not in appids:
invalid_appids.add(appid)

# If an ID doesn't exist in the Steam result then it's invalid
invalid_appids.update(appids - steam_appids)

if invalid_appids:
err = f'The following Steam app ids are invalid: {invalid_appids}'
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/steam_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def handle_after_logon() -> None:

client.anonymous_login()

def get_valid_appids(self, appids: set[int]) -> list[int]:
def get_valid_appids(self, appids: set[int]) -> set[int]:
"""Queries Steam for the specified appids.
If an appid doesn't exist, it won't be in the response.
Expand All @@ -63,6 +63,6 @@ def get_valid_appids(self, appids: set[int]) -> list[int]:
raise ValueError(err)

data = proto_to_dict(resp)
appids = [app['appid'] for app in data['apps']]
appids = {app['appid'] for app in data['apps']}

return appids
return appids

0 comments on commit b456f81

Please sign in to comment.