Skip to content

Commit

Permalink
Make black happy...
Browse files Browse the repository at this point in the history
  • Loading branch information
bmario committed Sep 22, 2020
1 parent 0c0c3e5 commit 8ba8d96
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
6 changes: 2 additions & 4 deletions aiocouch/couchdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,13 @@ async def __aexit__(self, exc_type, exc_value, traceback):
async def check_credentials(self):
"""Check the provided credentials.
:raises ~aiocouch.UnauthorizedError: if provided credentials aren't valid
:raises ~aiocouch.UnauthorizedError: if provided credentials aren't valid
"""
await self._server._check_session()

async def close(self):
"""Closes the connection to the CouchDB server
"""
"""Closes the connection to the CouchDB server"""
await self._server.close()

async def create(self, id: str, exists_ok: bool = False, **kwargs) -> "Database":
Expand Down
7 changes: 6 additions & 1 deletion aiocouch/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ async def _head(self, path, params=None):
return await self._request("HEAD", path, params=params)

async def _request(
self, method, path, params, return_json=True, **kwargs,
self,
method,
path,
params,
return_json=True,
**kwargs,
):
kwargs["params"] = _stringify_params(params)

Expand Down
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
with open(_changelog_path, "r") as changelog:
try:
_version_info = re.match(
r"# v(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)", changelog.readline(),
r"# v(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)",
changelog.readline(),
).groupdict()
except (OSError, IndexError):
raise RuntimeError("Unable to determine version.")
Expand Down
3 changes: 2 additions & 1 deletion tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ async def test_cookie_authentication(event_loop, couchdb_with_user_access):
# create a session cookie, which can be used later
async with aiohttp.ClientSession() as session:
async with session.post(
f"{hostname}/_session", data={"name": user, "password": user},
f"{hostname}/_session",
data={"name": user, "password": user},
) as resp:
assert resp.status == 200
await resp.json()
Expand Down

0 comments on commit 8ba8d96

Please sign in to comment.