pylint + pony.orm
Hi, I decided to check my project via pylint, but this check failed with error "Unexpected keyword argument 'field1' in constructor call (unexpected-keyword-arg)". What should I do to do to fix this error? ? In t he test project two files: __init __. py and test.p y . test.p y # coding: utf-8 from pony.orm import sql_debug, db_session, Database, Required db = Database() class MyClass(db.Entity): field1=Required(unicode) db.bind('sqlite', '/tmp/dns11.sqlite', create_db=True) db.generate_mapping(create_tables=True) with db_session: MyClass(field1='aaa') Regards, Anna.
On Wed, Aug 26, 2015 at 5:37 PM, Аня Свалова <saa1330@gmail.com> wrote:
Hi, I decided to check my project via pylint, but this check failed with error "Unexpected keyword argument 'field1' in constructor call (unexpected-keyword-arg)". What should I do to do to fix this error? ?
In t he test project two files: __init __. py and test.p y .
test.p y
# coding: utf-8
from pony.orm import sql_debug, db_session, Database, Required
db = Database()
class MyClass(db.Entity): field1=Required(unicode)
db.bind('sqlite', '/tmp/dns11.sqlite', create_db=True) db.generate_mapping(create_tables=True)
with db_session: MyClass(field1='aaa')
Regards, Anna.
_______________________________________________
Hi Anna, Could you create an issue with these details on https://bitbucket.org/logilab/pylint/? Most probably it's a false positive that needs to be fixed in pylint, if the code works without any issues. /Claudiu
participants (2)
-
Claudiu Popa
-
Аня Свалова