Linting
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from datetime import date, datetime
|
||||
from decimal import Decimal
|
||||
|
||||
from pony.orm import (
|
||||
from pony.orm import ( # type: ignore[import-untyped]
|
||||
Database,
|
||||
LongStr,
|
||||
Optional,
|
||||
@@ -16,7 +16,7 @@ db = Database
|
||||
db = Database()
|
||||
|
||||
|
||||
class Cases(db.Entity):
|
||||
class Cases(db.Entity): # type: ignore[name-defined]
|
||||
case_id = PrimaryKey(int, auto=True)
|
||||
docket_id = Required(str)
|
||||
petitioners = Required(str)
|
||||
@@ -24,28 +24,32 @@ class Cases(db.Entity):
|
||||
date = Required(date)
|
||||
active = Required(bool)
|
||||
entries = Set("Entries")
|
||||
lhs_id = Set('Cases', column='lhs')
|
||||
rhs_id = Set('Cases', column='rhs')
|
||||
lhs_id = Set("Cases", column="lhs")
|
||||
rhs_id = Set("Cases", column="rhs")
|
||||
|
||||
class Entries(db.Entity):
|
||||
|
||||
class Entries(db.Entity): # type: ignore[name-defined]
|
||||
entry_id = PrimaryKey(int, auto=True)
|
||||
case_id = Required(Cases)
|
||||
date = Required(date)
|
||||
text = Required(LongStr)
|
||||
documents = Set('Documents')
|
||||
documents = Set("Documents")
|
||||
|
||||
class Documents(db.Entity):
|
||||
|
||||
class Documents(db.Entity): # type: ignore[name-defined]
|
||||
document_id = PrimaryKey(int, auto=True)
|
||||
entry_id = Required(Entries)
|
||||
name = Required(str)
|
||||
url = Required(LongStr)
|
||||
|
||||
class History(db.Entity):
|
||||
|
||||
class History(db.Entity): # type: ignore[name-defined]
|
||||
history_id = PrimaryKey(int, auto=True)
|
||||
year = Required(str, max_len=3)
|
||||
edocket = Required(bool)
|
||||
number = Required(int)
|
||||
|
||||
|
||||
|
||||
set_sql_debug(True)
|
||||
db.bind(
|
||||
provider="mysql",
|
||||
|
||||
Reference in New Issue
Block a user