<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    <br>
    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, '<span id="result_box" class="" lang="en"><span
        class="">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).<br>
        <br>
        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.<br>
        <br>
        Hope that helps, even a little,<br>
        <br>
        Vincent<br>
      </span></span><br>
    <div class="moz-cite-prefix">Le 8/25/2015 8:28 AM, Аня Свалова a
      écrit :<br>
    </div>
    <blockquote
cite="mid:CAEF6sB7f7U-qEqdzMR9EGu13Sp6zLwo4kJafNGcuFqM+gAYFqQ@mail.gmail.com"
      type="cite">
      <div dir="ltr"><span id="result_box" class="" lang="en"><span
            class="">
            <div class="gmail_default" style="display:inline">​​</div>
            <div class="gmail_default" style="display:inline">​Hi, ​</div>
            I decided to</span> <span class="">check my</span>
          <div class="gmail_default" style="display:inline">​project <br>
          </div>
          <span class="">via</span> <span class="">pylint</span><span>,</span>
          <span class="">but this
            <div class="gmail_default" style="display:inline">​check</div>
          </span> <span class="">failed</span> <span class="">with
            error</span> <span class="">"Unexpected keyword argument
            'field1' in constructor call (unexpected-keyword-arg)".</span>
          <span class="">What should I</span> <span class="">do to
            <div class="gmail_default" style="display:inline">​do to fix
              this error?<br>
            </div>
          </span><span class="">?</span><br>
          <br>
          <span class="">
            <div class="gmail_default" style="display:inline">​In t</div>
            he</span> <span class="">test project</span> <span
            class="">two files</span><span>:</span> <span class="">__init</span>
          <span class="">__</span><span>.</span>
          <div class="gmail_default" style="display:inline">​py​</div>
          <span class=""></span> <span class="">and</span> <span
            class="">test.p
            <div class="gmail_default" style="display:inline">​y​</div>
            .</span><br>
          <br>
          <span class="">test.p
            <div class="gmail_default" style="display:inline">​​</div>
          </span>
          <div class="gmail_default" style="display:inline">​y​</div>
          <br>
          <span class="">
            <div class="gmail_default" style="display:inline">​​</div>
            <div class="gmail_default" style="display:inline">​# coding:
              utf-8<br>
              <br>
              from pony.orm import sql_debug, db_session, Database,
              Required<br>
              <br>
              db = Database()<br>
              <br>
              <br>
              class MyClass(db.Entity):<br>
                  field1=Required(unicode)<br>
              <br>
              <br>
              db.bind('sqlite', '/tmp/dns11.sqlite', create_db=True)<br>
              db.generate_mapping(create_tables=True)<br>
              <br>
              with db_session:<br>
                  MyClass(field1='aaa')<br>
              <br>
              ​</div>
          </span><span></span><span class=""></span><span class=""></span><span
            class=""></span><span class=""></span><span class=""></span><span
            class=""></span><span class=""></span><span class=""></span><br>
          <div class="gmail_default" style="display:inline">​Regards,<br>
          </div>
          <div class="gmail_default" style="display:inline">Anna.​</div>
        </span></div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
ponyorm-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ponyorm-list@ponyorm.org">ponyorm-list@ponyorm.org</a>
<a class="moz-txt-link-freetext" href="/ponyorm-list">/ponyorm-list</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>