How do I create a pylintrc file

user3330833 picture user3330833 · Mar 17, 2014 · Viewed 97.3k times · Source

I am running linux. Can I do something like pylint --generate-rcfile > .pylintrc and then make changes to the resulting .pylintrc file to override the default settings? And if so should it be in my ~/ directory or should I put it in .pylint.d?

Answer

sthenault picture sthenault · Mar 17, 2014

You may put it in:

  • /etc/pylintrc for default global configuration
  • ~/.pylintrc for default user configuration
  • <your project>/pylintrc for default project configuration (used when you'll run pylint <your project>)
  • wherever you want, then use pylint --rcfile=<wherever I want>

Also notice when generating the rc file, you may add option on the command line before the --generate-rcfile, they will be considered in the generated file.