Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #77457

Re: PyDev Code Analysis

References <67700207-2d66-440b-ba9c-f33757cc9783@googlegroups.com>
From Fabio Zadrozny <fabiofz@gmail.com>
Date 2014-09-02 21:29 -0300
Subject Re: PyDev Code Analysis
Newsgroups comp.lang.python
Message-ID <mailman.13721.1409704200.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, Sep 2, 2014 at 2:27 PM, Wanderer <wanderer@dialup4less.com> wrote:

>
> I'm trying to set up Eclipse with PyDev and I can't get the code analysis
> to work the way I want.
>
> Whenever I type 'def' it generates an error before I finish the line. I
> don't want to see errors until I finish typing. It's not an error I'm just
> not done yet. So I try to turn this off by going to
> Window>Preferences>PyDev>Editor>CodeAnalysis and setting the option When do
> we analyze? to Only on save. This doesn't stop these errors from showing up
> while I'm typing. What it does is stop checking for warnings like 'unused
> variable' even on save. If I set the option to 'On any successful parse'
> then it will check for these warning only on save.
>
> To summarize
> Setting 'Only on save', turns off warnings but keeps giving real time
> errors.
>
> Setting 'On any successful parse', checks for warnings only on save and
> keeps giving real time errors.
>
> I'm using
> Eclipse IDE for C/C++ Developers 4.4.0.21040612
> Pydev for Eclipse 3.7.0.201408261926
>
>
> What I am I doing wrong?
>
> Thanks
>

Well, there are 2 different things there:

Code analysis and syntax analysis.

Syntax analysis is always done on the fly (and you can't really turn it off
-- the places which require an AST will usually use the AST which is
computed there and when it's computed and there's a syntax error, that
error will be shown). It should usually be computed when a new line is
entered, on a save or after you entered some text and the timeout specified
at preferences > pydev > builders is elapsed.

As for the code analysis (which will check errors and warnings such as
unused imports / unresolved imports / undefined variables, etc.), it has
the options you saw (which are affected by the only on save/on any
successful parse).

Cheers,

Fabio

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

PyDev Code Analysis Wanderer <wanderer@dialup4less.com> - 2014-09-02 10:27 -0700
  Re: PyDev Code Analysis Fabio Zadrozny <fabiofz@gmail.com> - 2014-09-02 21:29 -0300
    Re: PyDev Code Analysis Wanderer <wanderer@dialup4less.com> - 2014-09-02 17:37 -0700

csiph-web