question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autocomplete showing global namespace (including yet not allocated variables).

See original GitHub issue

(I am not sure how to make a reproducible example for this case, my apologies).

Problem Description

Code completion (after the dot) shows all classes and methods in the namespace, even if they have not been allocated yet. e.g.

What steps reproduce the problem?

I invoke a class from a module that I have installed with pip development mode.

What is the expected output? What do you see instead?

Autocomplete only the parameters that have been allocated / called.

Versions

  • Spyder version: 3.3.6
  • Python version: 3.7
  • Qt version: 5.9.7
  • PyQt version: 5.9.2
  • Operating System name/version: Windows 10

Dependencies

IPython >=4.0     :  7.5.0 (OK)
cython >=0.21     :  None (NOK)
jedi >=0.9.0      :  0.15.1 (OK)
matplotlib >=2.0.0:  3.1.1 (OK)
nbconvert >=4.0   :  5.6.1 (OK)
numpy >=1.7       :  1.17.4 (OK)
pandas >=0.13.1   :  0.25.3 (OK)
pycodestyle >=2.3 :  2.5.0 (OK)
pyflakes >=0.6.0  :  2.1.1 (OK)
pygments >=2.0    :  2.4.2 (OK)
pylint >=0.25     :  2.4.3 (OK)
qtconsole >=4.2.0 :  4.5.5 (OK)
rope >=0.9.4      :  0.14.0 (OK)
sphinx >=0.6.6    :  2.2.1 (OK)
sympy >=0.7.3     :  None (NOK)

packages in environment at C:\Anaconda3\envs\phenopype_env:

Name Version Build Channel alabaster 0.7.12 py37_0 asn1crypto 1.2.0 py37_0 astroid 2.3.2 py37_0 atomicwrites 1.3.0 pypi_0 pypi attrs 19.3.0 py_0 babel 2.7.0 py_0 backcall 0.1.0 py37_0 bleach 3.1.0 py37_0 ca-certificates 2019.10.16 0 certifi 2019.9.11 py37_0 cffi 1.13.1 py37h7a1dbc1_0 chardet 3.0.4 py37_1003 cloudpickle 1.2.2 py_0 colorama 0.4.1 py37_0 cryptography 2.8 py37h7a1dbc1_0 cycler 0.10.0 pypi_0 pypi decorator 4.4.1 py_0 defusedxml 0.6.0 py_0 docutils 0.15.2 py37_0 entrypoints 0.3 py37_0 exdir 0.4.1 pypi_0 pypi exifread 2.1.2 pypi_0 pypi icu 58.2 ha66f8fd_1 idna 2.8 py37_0 imagesize 1.1.0 py37_0 importlib_metadata 0.23 py37_0 ipykernel 5.1.3 py37h39e3cac_0 ipython 7.5.0 pypi_0 pypi ipython_genutils 0.2.0 py37_0 isort 4.3.21 py37_0 jedi 0.15.1 py37_0 jinja2 2.10.3 py_0 jpeg 9b hb83a4c4_2 jsonschema 3.1.1 py37_0 jupyter_client 5.3.4 py37_0 jupyter_core 4.6.1 py37_0 keyring 18.0.0 py37_0 kiwisolver 1.1.0 pypi_0 pypi lazy-object-proxy 1.4.3 py37he774522_0 libpng 1.6.37 h2a8f88b_0 libsodium 1.0.16 h9d3ae62_0 markupsafe 1.1.1 py37he774522_0 matplotlib 3.1.1 pypi_0 pypi mccabe 0.6.1 py37_1 mistune 0.8.4 py37he774522_0 more-itertools 7.2.0 py37_0 nbconvert 5.6.1 py37_0 nbformat 4.4.0 py37_0 numpy 1.17.4 pypi_0 pypi numpydoc 0.9.1 py_0 opencv-contrib-python 3.4.5.20 pypi_0 pypi openssl 1.1.1d he774522_3 packaging 19.2 py_0 pandas 0.25.3 pypi_0 pypi pandoc 2.2.3.2 0 pandocfilters 1.4.2 py37_1 parso 0.5.1 py_0 phenopype 0.9.0 dev_0 <develop> pickleshare 0.7.5 py37_0 pillow 6.2.1 pypi_0 pypi pip 19.3.1 py37_0 pluggy 0.13.0 pypi_0 pypi prompt_toolkit 2.0.10 py_0 psutil 5.6.3 py37he774522_0 py 1.8.0 pypi_0 pypi pycodestyle 2.5.0 py37_0 pycparser 2.19 py37_0 pyflakes 2.1.1 py37_0 pygments 2.4.2 py_0 pylint 2.4.3 py37_0 pyopenssl 19.0.0 py37_0 pyparsing 2.4.2 py_0 pyqt 5.9.2 py37h6538335_2 pyrsistent 0.15.4 py37he774522_0 pysocks 1.7.1 py37_0 pytesseract 0.2.6 pypi_0 pypi pytest 4.2.0 pypi_0 pypi python 3.7.5 h8c8aaf0_0 python-dateutil 2.8.1 py_0 pytz 2019.3 py_0 pywin32 223 py37hfa6e2cd_1 pyyaml 5.1.2 pypi_0 pypi pyzmq 18.1.0 py37ha925a31_0 qt 5.9.7 vc14h73c81de_0 qtawesome 0.6.0 py_0 qtconsole 4.5.5 py_0 qtpy 1.9.0 py_0 requests 2.22.0 py37_0 rope 0.14.0 py_0 ruamel-yaml 0.16.5 pypi_0 pypi ruamel-yaml-clib 0.2.0 pypi_0 pypi scipy 1.3.2 pypi_0 pypi setuptools 41.6.0 py37_0 sip 4.19.8 py37h6538335_0 six 1.12.0 py37_0 snowballstemmer 2.0.0 py_0 sphinx 2.2.1 py_0 sphinxcontrib-applehelp 1.0.1 py_0 sphinxcontrib-devhelp 1.0.1 py_0 sphinxcontrib-htmlhelp 1.0.2 py_0 sphinxcontrib-jsmath 1.0.1 py_0 sphinxcontrib-qthelp 1.0.2 py_0 sphinxcontrib-serializinghtml 1.1.3 py_0 spyder 3.3.6 py37_0 spyder-kernels 0.5.2 py37_0 sqlite 3.30.1 he774522_0 testpath 0.4.2 py37_0 tornado 6.0.3 py37he774522_0 trackpy 0.4.1 pypi_0 pypi traitlets 4.3.3 py37_0 urllib3 1.24.2 py37_0 vc 14.1 h0510ff6_4 vs2015_runtime 14.16.27012 hf0eaf9b_0 wcwidth 0.1.7 py37_0 webencodings 0.5.1 py37_1 wheel 0.33.6 py37_0 win_inet_pton 1.1.0 py37_0 wincertstore 0.2 py37_0 wrapt 1.11.2 py37he774522_0 zeromq 4.3.1 h33f27b4_3 zipp 0.6.0 py_0 zlib 1.2.11 h62dcd97_3

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mluerigcommented, Nov 15, 2019
0reactions
ccordoba12commented, Nov 15, 2019

@mluerig, thanks! Could you upload the contents of testmod in a zip file so we don’t have to recreate ourselves?

Read more comments on GitHub >

github_iconTop Results From Across the Web

PHP Pass variables with types from global namespace to ...
So how can I pass variables from the global namespace with their types to my included PHP files? PHP 8.1.2. php.
Read more >
Namespaces and Autocomplete - Autodesk
Namespaces. In Python, all variables, functions and module names are in either the local namespace (restricted to a function) or in the global...
Read more >
26. Global vs. Local Variables and Namespaces
Global versus local Variables, i.e. when and how to use global and local variables in Python namespaces.
Read more >
Namespaces - GitLab Docs
A personal namespace, which is based on your username and provided to you when you create your account. You cannot create subgroups in...
Read more >
Babashka book
Babashka comes with batteries included and packs libraries like clojure.tools.cli for parsing command line arguments and cheshire for working with JSON.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found