Skip to content

Commit

Permalink
various bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
itsuchur committed May 9, 2022
1 parent a461b29 commit 7d99f05
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
9 changes: 1 addition & 8 deletions aiowallhaven/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async def search(self,
case 'nsfw':
query_params["purity"] = 111
case _:
return logging.error("No valid purity filter found. Only 'sfw', 'sketchy', and 'nsfw' are considered to be valid purity filters.")
return LOG.error("No valid purity filter found. Only 'sfw', 'sketchy', and 'nsfw' are considered to be valid purity filters.")

if sorting is not None:
if sorting in SORTING:
Expand Down Expand Up @@ -222,10 +222,3 @@ async def get_collections(self, username: str = None, collection_id: int = None,
return LOG.error("No valid purity filter found. Only 'sfw', 'sketchy', and 'nsfw' are considered to be valid purity filters.")

return await self._get_method(f"collections" if query_params is None else f"collections?{'&'.join('{}={}'.format(*i) for i in query_params.items())}")

""""
url
if username is not None:
return await self._get_method(f"collections/{username}")
else:
return await self._get_method(f"collections")"""
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Inside of setup.cfg
[metadata]
description-file = README.md
9 changes: 3 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pathlib
import sys

if sys.version_info < (3, 7):
if sys.version_info < (3, 10):
raise RuntimeError('aiowallhaven requires Python 3.6 or greater')

_ROOT = pathlib.Path(__file__).parent
Expand All @@ -19,17 +19,14 @@
long_description=readme,
long_description_content_type="text/markdown",
url="https://github.com/itsuchur/aiowallhaven",
download_url = 'https://github.com/user/reponame/archive/v_01.tar.gz',
packages=setuptools.find_packages(),
classifiers=[
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.7.0',
python_requires='>=3.10.0',
license='MIT',
)

0 comments on commit 7d99f05

Please sign in to comment.