error in line: from builtins import True added by autocompletion - python-3.7

I am experiencing the following strange and annoying behavior of PyDev plugin when entering source code: when typing the beginning letters of some reserved keywords, as Tru or Fal, PyDev auto-completion mecanism randomly only suggests in its popup "True-builtins", which correctly completes Tru with True, BUT ADDS from builtins import True at the beginning (which yields an error). Some other times, completion works normally: only True (alone, without -builtins) is proposed in the popup; in this case, typing ENTER completes with True AND doesn't add from builtins import True at the beginning.
I suspect this comes from bad configuration of PyDev (not sure), but I cannot fix it though I searched in window->Preferences->PyDev->Editor->Code Analysis->Code completion (and elsewhere). Also I searched in stack overflow pydev quesios tagged PyDev and googling did not either give valuable hints.
If anyone has an idea, thank's in advance. Hereunder are my version informations:
PyDev version: 8.0.1.202011071328
Eclipse IDE for Java Developers (includes Incubating components)
Version: 2020-09 (4.17.0)
Build id: 20200910-1200
OS: Linux, v.4.19.0-12-amd64, x86_64 / gtk 3.24.5
Java version: 12.0.2
Greatfully,
Frédéric Baldit.

Related

How do I get Eclipse Mars to compile C++11 with MinGW?

I have read every post I can find. I have Eclipse Mars release 4.5.1 and MinGW GCC ver 4.8.1
I have done the following:
Create new workspace.
Created File > New > C++ Project.>Executable>Hello World
Built and Run successfully
added the line
auto i = 6;
The IDE shows
'auto' changes meaning in C++11; please remove it [-
Wc++0x-compat]
I then went to project>C/C++ Build>Settings>Tool Settings>GCC C++ Compiler>Dialect>Language standard and selected C++11.
I also went to project>C/C++ General>Preprocessor Include Path>Providers Select CDT GCC Built-in Compiler Settings and untick “Use global provider...” box then add –std=c++0x
Finally I chose Project>Refresh and Project>Index>Rebuild
But still the error on auto.
Is this Wc++0x-compat switch a problem? Where do I find it?
What else should I do?

Is Eclipse Mars CDT support C++11 thread?

I have the following setup:
Eclipse Mars 4.5 (Build id:20150621-1200)
MinGW 201310 with g++ 4.8.1
Windows 10
I followed few post to add std=c++11 in Project property and make sure __cplusplus is 201103L. Here is the result:
I can see that std::map compile and run ok.
If I #include , there is no syntax error. But the declaration of thread in main() shows error "Type thread could not be resolved". Then I open up thread header file located in c:/MinGW/lib/gcc/mingw32/4.8.1/include/c++/thread, it seems that the whole class is dimmed due to that _GLIBCXX_HAS_GTHREADS is undefined. If I manually define it in the path and symbols, then the thread class is fully defined. But there comes more errors in the thread itself. Did I missed something? Or if the C++11 thread isn't ready on eclipse+MinGW? Thank you!
To get support for std::thread, you will want a MinGW build equipped with posix threading model support.
I'm not sure if there's a "classic" MinGW build with that feature,
but it's available with MinGW-w64.
You can get a MinGW-w64 installation in a number of ways, but the installer under the "Mingw-builds" link should be sufficient to get you started (and will let you pick which release GCC you want).

Ensime not typechecking correctly, nor is its autocomplete working

I wanted to try and see how good Ensime's type checking capabilities were, and while they seemed to work fine at first, it appears it keeps referencing bits of code that no longer exist: (larger version here)
It says it couldn't find the value asdfadsfasdf which was correct, back when I wrote it as random garbage to test the type checker; however it's not there anymore and Ensime keeps complaining about it, rather than spotting the missing : and wrong type name in the when function.
Add to that the fact that despite it having access to the Ensime server, it still won't run autocomplete..
Specs:
Emacs version: 24.3.1
Sbt version: 0.13.5
System: Mac OS X version 10.9.5 "Mavericks"
Excerpt from .emacs that relates to Ensime and Scala:
(require 'ensime)
(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)
What do I do to get it working correctly?

Dart static type errors (instead of just warnings) in Eclipse

I am using the Dart plugin for Eclipse (not the standalone Dart Editor).
How do I configure the project/build so that static type warnings appear as errors in the Eclipse "Problems" tab? For example, this line of code actually compiles, which seems ludicrous:
int newtodo = new LIElement();
Running dartanalyzer at the command line gives an error, as desired:
dartanalyzer foo.dart
But instead of having to run dartanalyzer at the command line (or discovering them at runtime), I would like to have these errors reported on-the-fly in Eclipse.
If this doesn't produce a warning this is a bug according to this discussion new user question. type warnings as errors in Eclipse
(Also initiated from #Justin M. Keyes)

PyDev import in eclipse

I just installed Eclipse Indigo, in Ubuntu 10.04 LTS, and installed Pydev with it. I did the following:
(1) set python interpreters by pressing Auto config in Window > Preferences > PyDev > Editor > Interpreter-Python
(2) set system Pythonpath through Window > Preferences > PyDev > Editor > Interpreter-Python
(a) pressed New Folder and added /usr/lib/python2.6
I am trying to run an openrave code in eclipse and have all the required openrave libraries installed. "openravepy" is in the directory /usr/lib/python2.6/dist-packages.
My problems is that it seems that the import is not successful that a few function calls return error type : PyDev Problem. It says 'Undefined Variable: ...'
here are some snippets of the code:
from itertools import izip
from openravepy import *
from numpy import *
import time
class FastGrasping:
class GraspingException(Exception):
def __init__(self,args):
self.args=args
def __init__(self,robot,target):
self.robot = robot
self.ikmodel = databases.inversekinematics.InverseKinematicsModel(robot=robot,iktype=IkParameterization.Type.Transform6D)
--databases is part of openravepy and described as undefined variable.
I've read a few threads and I already did the following
(1) Remove and readd pydev
(2) I've run the code previously, it used to work with eclipse helios and pydev setup. so, I Deleted and reinstall eclipses helios and indigo and repeat the process of adding pydev and pythonpath again and again.
Anyone know hows can I fix this? or is this a bug in pydev?
thanks in advance.
cheers
Have you tried adding 'openravepy' to the forced builtins (see: http://pydev.org/manual_101_interpreter.html for details)?
Also, does it run properly? (i.e.: the issue only happens in the PyDev code-analysis or also when you run the code in Python from within PyDev?)
I have found that the Auto config does not always auto select the site-packages directory. This is where most installed modules reside, numpy for example on my machine. Try doing auto-config once more and also select the directory ending in site-packages, if you have not done so already.