Black lint all the things

This commit is contained in:
Curtis Castrapel
2019-05-16 07:57:02 -07:00
parent 3680d523d4
commit 68fd1556b2
226 changed files with 9340 additions and 5940 deletions

View File

@ -12,8 +12,8 @@ from lemur.policies import service as policy_service
manager = Manager(usage="Handles all policy related tasks.")
@manager.option('-d', '--days', dest='days', help='Number of days before expiration.')
@manager.option('-n', '--name', dest='name', help='Policy name.')
@manager.option("-d", "--days", dest="days", help="Number of days before expiration.")
@manager.option("-n", "--name", dest="name", help="Policy name.")
def create(days, name):
"""
Create a new certificate rotation policy

View File

@ -12,10 +12,12 @@ from lemur.database import db
class RotationPolicy(db.Model):
__tablename__ = 'rotation_policies'
__tablename__ = "rotation_policies"
id = Column(Integer, primary_key=True)
name = Column(String)
days = Column(Integer)
def __repr__(self):
return "RotationPolicy(days={days}, name={name})".format(days=self.days, name=self.name)
return "RotationPolicy(days={days}, name={name})".format(
days=self.days, name=self.name
)

View File

@ -24,7 +24,7 @@ def get_by_name(policy_name):
:param policy_name:
:return:
"""
return database.get_all(RotationPolicy, policy_name, field='name').all()
return database.get_all(RotationPolicy, policy_name, field="name").all()
def delete(policy_id):