Skip to content

Commit

Permalink
fix flake8/isort issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaiarocci committed Aug 7, 2018
1 parent 050726c commit 4bd4c18
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 18 deletions.
16 changes: 4 additions & 12 deletions eve_sqlalchemy/examples/simple/tables.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
from sqlalchemy import Column, DateTime, ForeignKey, Integer, String, func
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.orm import column_property, relationship

Base = declarative_base()
from eve_sqlalchemy.declarative import BaseModel


class CommonColumns(Base):
__abstract__ = True
_created = Column(DateTime, default=func.now())
_updated = Column(DateTime, default=func.now(), onupdate=func.now())
_etag = Column(String(40))


class People(CommonColumns):
class People(BaseModel):
__tablename__ = 'people'
id = Column(Integer, primary_key=True, autoincrement=True)
firstname = Column(String(80))
lastname = Column(String(120))
fullname = column_property(firstname + " " + lastname)


class Invoices(CommonColumns):
class Invoices(BaseModel):
__tablename__ = 'invoices'
id = Column(Integer, primary_key=True, autoincrement=True)
number = Column(Integer)
Expand Down
1 change: 1 addition & 0 deletions eve_sqlalchemy/tests/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from sqlalchemy import Column, DateTime, String, func
from sqlalchemy.ext.declarative import declared_attr

from eve_sqlalchemy.declarative import BaseModel


Expand Down
1 change: 0 additions & 1 deletion eve_sqlalchemy/tests/integration/collection_class_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from eve_sqlalchemy.declarative import BaseModel
from eve_sqlalchemy.tests import TestMinimal


association_table = Table(
'association', BaseModel.metadata,
Column('left_id', Integer, ForeignKey('left.id')),
Expand Down
8 changes: 4 additions & 4 deletions eve_sqlalchemy/tests/integration/get_none_values.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from sqlalchemy import Column, DateTime, Integer, String, func
from sqlalchemy import Column, Integer

from eve_sqlalchemy.config import DomainConfig, ResourceConfig
from eve_sqlalchemy.tests import TestMinimal

from eve_sqlalchemy.declarative import BaseModel
from eve_sqlalchemy.tests import TestMinimal


class Node(BaseModel):
Expand All @@ -29,7 +28,8 @@ class Node(BaseModel):
class TestGetNoneValues(TestMinimal):

def setUp(self, url_converters=None):
super(TestGetNoneValues, self).setUp(SETTINGS, url_converters, BaseModel)
super(TestGetNoneValues, self).setUp(SETTINGS, url_converters,
BaseModel)

def bulk_insert(self):
self.app.data.insert('nodes', [{'id': k} for k in range(1, 5)])
Expand Down
5 changes: 4 additions & 1 deletion eve_sqlalchemy/tests/test_sql_tables.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from sqlalchemy import Boolean, Column, DateTime, Float, ForeignKey, Integer, LargeBinary, PickleType, String, Table
from sqlalchemy import (
Boolean, Column, DateTime, Float, ForeignKey, Integer, LargeBinary,
PickleType, String, Table,
)
from sqlalchemy.orm import relationship

from eve_sqlalchemy.declarative import BaseModel
Expand Down

0 comments on commit 4bd4c18

Please sign in to comment.