Reformat to follow PEP standards

This commit is contained in:
BBaoVanC 2020-10-05 01:07:22 -05:00
parent 8ae91f7ffa
commit 8c635adcc7
No known key found for this signature in database
GPG Key ID: 6D74C8B0E7D791C2
2 changed files with 40 additions and 38 deletions

View File

@ -24,7 +24,8 @@ def load_config():
for param in params: for param in params:
config[param[0]] = param[1] config[param[0]] = param[1]
else: else:
raise Exception('Section {0} not found in the {1} file'.format(section, filename)) raise Exception(
'Section {0} not found in the {1} file'.format(section, filename))
return config return config

View File

@ -11,7 +11,7 @@ from flask_api import status
from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.orm.exc import NoResultFound
import sqlalchemy import sqlalchemy
from libdb import engine, Session, Location, ProductQuantity, Product, Brand from libdb import Session, Location, ProductQuantity, Product, Brand
app = Flask(__name__) # app is the Flask app app = Flask(__name__) # app is the Flask app
@ -191,7 +191,8 @@ def api_create_brand():
else: else:
branddesc = None branddesc = None
ins = sqlalchemy.insert(Brand).values(name=brandname, description=branddesc) ins = sqlalchemy.insert(Brand).values(
name=brandname, description=branddesc)
print(f"ins is {ins}") print(f"ins is {ins}")
session.execute(ins) session.execute(ins)
print("executed ins") print("executed ins")