2

I'm a beginner for Neovim recently I have a problem that is when I run any python file immediately after that in my local folder auto-create a new file that has end file name is ".stats".I posted this post wishes someone to can help me. Thank u for reading.

Here my image example: enter image description here

Here is my init.vim link: enter link description here

thep200
  • 29
  • 6

2 Answers2

1

These files generated by pylint. If you have any plugin for auto-linting, which use this linter (such as ALE), .stats files will be generated each time you open/save python files, depending on the plugin settings.
If you want to continue using this linter, you can disable generating .stats files by specifying the persistent pylint option as n (default is y).
You can also try to set environment variable PYLINTHOME to point to your directory (FAQ), but there may be a problem with it.
And of course, if you want, you can exclude this linter from the list in the your plugin settings.

More about what the 'persistent' option does.

The problem is, most likely, in the interaction of the calling plugin and the called pylint, because behavior with generating .stats files in the same directory with the checked files only works in this case. If you call the pylint check yourself, without nvim plugin, these files will be generated as declared in FAQ.

pas
  • 13
  • 1
  • 3
0

Previously, I was using pylint 2.9, which has this issue. I upgraded pylint to 2.15.5, now the issue is gone. Pylint now stores the stats file in cache directory instead of polluting the user's project directory. See here for the location of cache directory.

So the simple answer for now is to upgrade pylint:

pip install -U pylint
jdhao
  • 24,001
  • 18
  • 134
  • 273