Skip to content

Commit

Permalink
update pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
atsuoishimoto committed Dec 9, 2020
1 parent 498c134 commit 47b07f4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
7 changes: 5 additions & 2 deletions pyproject.toml
Expand Up @@ -4,14 +4,17 @@ build-backend = "setuptools.build_meta"


[tool.black]
line-length = 88
target-version = ['py37', 'py38']


[tool.pytest]
#addopts = -s
#log_cli = 1
log_cli_level = 'DEBUG'

[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
line_length = 88
7 changes: 4 additions & 3 deletions samples/flasktest/app.py
@@ -1,6 +1,7 @@
import os

from flask import Flask, redirect, render_template_string, request
from werkzeug import Response

from raindropio import *

Expand Down Expand Up @@ -30,7 +31,7 @@


@app.route("/approved")
def approved():
def approved() -> str:
oauth = create_oauth2session(client_id, redirect_uri=redirect_uri)
code = request.args.get("code")
token = oauth.fetch_token(
Expand All @@ -52,14 +53,14 @@ def approved():


@app.route("/login")
def login():
def login() -> Response:
oauth = create_oauth2session(client_id, redirect_uri=redirect_uri)
authorization_url, _ = oauth.authorization_url(API.URL_AUTHORIZE)
return redirect(authorization_url)


@app.route("/")
def index():
def index() -> str:
return render_template_string(INDEX)


Expand Down
1 change: 1 addition & 0 deletions samples/list_collections.py
@@ -1,3 +1,4 @@
# type: ignore
import os

from raindropio import *
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api.py
Expand Up @@ -19,7 +19,7 @@ def test_refresh() -> None:
resp = Response()
resp.status_code = 200
updated = {"access_token": "updated", "expires_at": time.time() + 100000}
resp._content = json.dumps(updated).encode() # type: ignore
resp._content = json.dumps(updated).encode()

m.return_value = resp
api.get("https://localhost", {})
Expand Down

0 comments on commit 47b07f4

Please sign in to comment.