mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-23 07:46:06 -04:00
Fix flake8 and isort findings
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
import csv
|
import csv
|
||||||
import functools
|
import functools
|
||||||
import itertools
|
import itertools
|
||||||
from os import getenv
|
|
||||||
import uuid
|
import uuid
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
from os import getenv
|
||||||
|
|
||||||
import click
|
import click
|
||||||
import flask
|
import flask
|
||||||
@@ -748,6 +748,7 @@ def create_test_user(name, email, mobile_number, password, auth_type, state, adm
|
|||||||
print("duplicate user", user.name)
|
print("duplicate user", user.name)
|
||||||
db.session.rollback()
|
db.session.rollback()
|
||||||
|
|
||||||
|
|
||||||
@notify_command(name='create-admin-jwt')
|
@notify_command(name='create-admin-jwt')
|
||||||
def create_admin_jwt():
|
def create_admin_jwt():
|
||||||
if getenv('NOTIFY_ENVIRONMENT', '') != 'development':
|
if getenv('NOTIFY_ENVIRONMENT', '') != 'development':
|
||||||
@@ -755,6 +756,7 @@ def create_admin_jwt():
|
|||||||
return
|
return
|
||||||
print(create_jwt_token(current_app.config['SECRET_KEY'], current_app.config['ADMIN_CLIENT_ID']))
|
print(create_jwt_token(current_app.config['SECRET_KEY'], current_app.config['ADMIN_CLIENT_ID']))
|
||||||
|
|
||||||
|
|
||||||
@notify_command(name='create-user-jwt')
|
@notify_command(name='create-user-jwt')
|
||||||
@click.option('-t', '--token', required=True, prompt=False)
|
@click.option('-t', '--token', required=True, prompt=False)
|
||||||
def create_user_jwt(token):
|
def create_user_jwt(token):
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from flask import Blueprint, current_app, send_file
|
|||||||
|
|
||||||
docs = Blueprint('docs', __name__, url_prefix='/docs')
|
docs = Blueprint('docs', __name__, url_prefix='/docs')
|
||||||
|
|
||||||
|
|
||||||
@docs.route('/openapi.yml', methods=['GET'])
|
@docs.route('/openapi.yml', methods=['GET'])
|
||||||
def send_openapi():
|
def send_openapi():
|
||||||
openapi_schema = path.join(current_app.root_path, '../docs/openapi.yml')
|
openapi_schema = path.join(current_app.root_path, '../docs/openapi.yml')
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ flask command create-admin-jwt | tail -n 1 | pbcopy
|
|||||||
flask command create-user-jwt --token=<USER_API_TOKEN> | tail -n 1 | pbcopy
|
flask command create-user-jwt --token=<USER_API_TOKEN> | tail -n 1 | pbcopy
|
||||||
```
|
```
|
||||||
|
|
||||||
to copy a token usable by the admin UI to your pasteboard. This token will expire in 30 seconds
|
to copy a token to your pasteboard. This token will expire in 30 seconds
|
||||||
|
|
||||||
### Disable token expiration checking in development
|
### Disable token expiration checking in development
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user