Skip to content

Commit

Permalink
3.6.2
Browse files Browse the repository at this point in the history
- fix github_downloads()
- fix run_tests.py
  • Loading branch information
SirDank committed Apr 27, 2024
1 parent ab6b8ff commit defba50
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dankware/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ def github_downloads(user_repo: str) -> tuple[str]:
```
"""

response = requests.get(f"https://api.github.com/repos/{user_repo}/releases/latest", headers = {"User-Agent": "dankware"}, timeout=3).json()
response = requests.get(f"https://api.github.com/repos/{user_repo}/releases/latest", headers = {"User-Agent": "dankware"}, timeout=3)

if response.status_code == 200:
return tuple(data["browser_download_url"] for data in response["assets"])
return tuple(data["browser_download_url"] for data in response.json()["assets"])
raise RuntimeError(f"Failed to get latest release from github: [{response.status_code}] {response.reason}")

def github_file_selector(user_repo: str, filter_mode: str, filter_iterable: list[str] | tuple[str]) -> tuple[str]:
Expand Down
2 changes: 1 addition & 1 deletion run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def gen_new():
COUNTER += 1; print(clr(f"\n___[{COUNTER}]__________________________________________________________________________________\n"))

if os.name == 'nt':
locations = ("AppData", "Desktop", "Documents", "Personal", "Favorites", "Local AppData", "Pictures", "My Pictures", "Videos", "My Video", "Music", "My Music")
locations = ("AppData", "Desktop", "Documents", "Favorites", "Local AppData", "Music", "Pictures", "Videos")
elif os.name == 'posix':
locations = ("Desktop", "Documents", "Downloads", "Pictures", "Videos", "Music")
for location in locations:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

license = "MIT",
name = "dankware",
version = "3.6.1",
version = "3.6.2",
author = "SirDank",

author_email = "SirDankenstein@protonmail.com",
Expand Down

0 comments on commit defba50

Please sign in to comment.