I'm using the latest version of python-mode with VIM 8.0 (compiled with python3). I've intentionally placed a reference to a non-existent function within another function like:
def foo(self):
# Call nonexistent function
self.bar()
I would expect to get a notice similar to:
E:408, 8: Instance of 'MyClass' has no 'bar' member (no-member)
However, I receive no such warning. In fact, there are many issues with this file that pop up when I run pylint from the command line but none of those are popping up in VIM. Things like the number of spaces between a class or function declaration and line indentation do show up.
What's wrong with my setup?
I've managed to figure out that it's just ignoring the pylint code for that particular issue but now I'm unsure of how to re-enable it. I've tried removing it from /pymode/libs/pylama/lint/pylama_pylint/pylint.rc as well as pylama.ini but it still doesn't spew out warnings for E1103. Any help would be appreciated. I'm refactoring code here and can't afford to miss something as stupid as a class not having a member..
I've run into this as well. I'm pretty sure ef21d74cea219f473e0fc1aab05b339a2faac18d introduces it.
Same issue here. Pylint is dead for sure.
Python 3.5.3
Pymode 0.9.2
$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 30 2017 18:21:38)
Included patches: 1-197, 322, 377-378, 550, 703, 706-707
Modified by [email protected]
Compiled by [email protected]
Huge version with GTK3 GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_sgr +tag_old_static
+arabic +find_in_path -mouse_sysmouse -tag_any_white
+autocmd +float +mouse_urxvt +tcl
+balloon_eval +folding +mouse_xterm +termguicolors
+browse -footer +multi_byte +terminfo
++builtin_terms +fork() +multi_lang +termresponse
+byte_offset +gettext -mzscheme +textobjects
+channel -hangul_input +netbeans_intg +timers
+cindent +iconv +num64 +title
+clientserver +insert_expand +packages +toolbar
+clipboard +job +path_extra +user_commands
+cmdline_compl +jumplist +perl +vertsplit
+cmdline_hist +keymap +persistent_undo +virtualedit
+cmdline_info +lambda +postscript +visual
+comments +langmap +printer +visualextra
+conceal +libcall +profile +viminfo
+cryptv +linebreak -python +vreplace
+cscope +lispindent +python3 +wildignore
+cursorbind +listcmds +quickfix +wildmenu
+cursorshape +localmap +reltime +windows
+dialog_con_gui +lua +rightleft +writebackup
+diff +menu +ruby +X11
+digraphs +mksession +scrollbind -xfontset
+dnd +modify_fname +signs +xim
-ebcdic +mouse +smartindent +xpm
+emacs_tags +mouseshape +startuptime +xsmp_interact
+eval +mouse_dec +statusline +xterm_clipboard
+ex_extra +mouse_gpm -sun_workshop -xterm_save
+extra_search -mouse_jsbterm +syntax
+farsi +mouse_netterm +tag_binary
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
defaults file: "$VIMRUNTIME/defaults.vim"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -g -O2 -fdebug-prefix-map=/build/vim-R2d1UQ/vim-8.0.0197=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L. -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib -llua5.2 -Wl,-E -fstack-protector-strong -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.24/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu -lpython3.5m -lpthread -ldl -lutil -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lieee -lm -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm
I've almost completely given up on using vim as an idea. It's extremely unfortunate as I'm most efficient with it but the use experience is just shitty. Pycharm sucks as far as user input and customization goes (my opinion) but at least I'm not wasting my time trying to get it to do trivial shit like load code references from a virtual environment or properly lint my code. Even GitHub's atom editor seems better. Both options are okay but vim emulation isn't perfect. Macro bugs and such..
I've had some problems with python-mode + linters and it seems that cleaning up the '.pyc' files solved them. Go to your python-mode dir (ou vim bundles dir) and run the following:
find . -name \*.pyc -delete.
You may also try deleting __pycache__ dirs with find . -name __pycache__ -type d -print | xargs /bin/rm -rf.
Thank you for answering.
I erased all *pyc files and __pycache__ dirs but still [Pymode] Found errors and warnings: 0 in a file with errors.
@raratiru try changing to the develop branch of python-mode and cleaning the files again.
@diraol Yes, in develop branch it is working, thank you!
I'm marking this as solved.
@diraol Thanks for the tip about switching to the develop branch, man! It did the trick for me too!
Most helpful comment
@raratiru try changing to the
developbranch of python-mode and cleaning the files again.