Skip to content

Commit 79fb25d

Browse files
authored
🐛fix categories again
changed c.lower() to c.title()
1 parent 4e85f7f commit 79fb25d

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed
275 Bytes
Binary file not shown.
4.07 KB
Binary file not shown.

jokeapi/main.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,13 @@ def build_request(
2626

2727
if len(category):
2828
for c in category:
29-
if not c.lower() in self.info["categories"]:
29+
if not c.title() in self.info["categories"]:
3030
raise ValueError(
3131
f'''Invalid category selected.
3232
You selected {c}.
3333
Available categories are:
34-
"programming"
35-
"miscellaneous"
36-
"dark"
37-
"pun".
34+
{"""
35+
""".join(self.info["categories"])}
3836
Leave blank for any.'''
3937
)
4038

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
setuptools.setup(
77
name="jokeapi",
88
packages=["jokeapi"],
9-
version="0.2.5",
9+
version="0.2.5.2",
1010
license="GNU General Public License v3 (GPLv3)",
1111
description="An API Wrapper for Sv443's JokeAPI",
1212
long_description=long_description,
1313
long_description_content_type="text/markdown",
1414
author="thenamesweretakenalready",
1515
author_email="[email protected]",
1616
url="""https://github.com/thenamesweretakenalready/Sv443s-JokeAPI-Python-Wrapper""",
17-
download_url="https://github.com/thenamesweretakenalready/Sv443s-JokeAPI-Python-Wrapper/archive/v0.2.5.tar.gz",
17+
download_url="https://github.com/thenamesweretakenalready/Sv443s-JokeAPI-Python-Wrapper/archive/v0.2.5.2.tar.gz",
1818
keywords=["api wrapper", "wrapper", "api", "jokes", "python", "joke api"],
1919
install_requires=[
2020
"urllib3==1.25.8",

0 commit comments

Comments
 (0)