Vincent LE GOFF
vincent.legoff.srs at gmail.com
Tue Aug 25 16:08:35 UTC 2015
I don't know if it's any better by now but pylint used to be a bit weird
sometimes, given syntax it doesn't understand. Pylint does a lot of
things that, in my opinion, it shouldn't, but I believe everything can
be configured. In this context, it simply complains that at your last
line, 'MyClass(field1='aaa')', there's no 'field1' in the constructor.
Which is basically false, because Pony's entity is constructed this way
(probably with a **kwargs in the method definition).
I may be wrong, but I think you can ask Pylint to not check that kind of
things. It gave you the specific error (probably the error number
too). I believe there's a way to configure pylint to ignore that error
and check nevertheless. But I have no idea how to do that.
Hope that helps, even a little,
Le 8/25/2015 8:28 AM, Аня Свалова a écrit :
> I decided to check my
> via pylint, but this
> 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 __.
> and test.p
> # coding: utf-8
> from pony.orm import sql_debug, db_session, Database, Required
> db = Database()
> class MyClass(db.Entity):
> db.bind('sqlite', '/tmp/dns11.sqlite', create_db=True)
> with db_session:
> ponyorm-list mailing list
> ponyorm-list at ponyorm.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ponyorm-list