A memorandum about the warning of the pylint output result

I wanted to write the code as cleanly as possible using pylint, so I decided to leave the meaning of the warning as a memorandum.

environment

-Ubuntu 16.04 -Python 2.7.11 :: Anaconda 4.1.0 (64-bit)

Installation method

$ pip install pylint

Execution method

$ pylint hoge.py

Warning list

For the time being, I will add only what I understand.

Missing module docstring (missing-docstring) It seems good to put a comment on the first line as follows

"""This is a test program."""

Unused matplotlib.pyplot imported as plt (unused-import) In this example, matplotlib.pyplot was imported but not used.

import matplotlib.pyplot as plt
Deleted the line

Invalid constant name "model" (invalid-name) In this example, the name model seems to be bad.

If constant,(([A-Z_][A-Z0-9_]*)|(__.*__))$
The name is MODEL because it is named according to the rules of

Module 'numpy.random' has no 'randn' member (no-member)

sample.py


'''This is a test program.'''                           
import numpy as np                                      


print np.random.randn(6, 4)

The error was caught in the sample code above, but it worked fine, so Create a new ~ / .pylintrc file as shown below The judgment of numpy.random was excluded as follows.

~/.pylintrc


[TYPECHECK]
ignored-modules = numpy.random

Recommended Posts

A memorandum about the warning of the pylint output result
Output the output result of sklearn.metrics.classification_report as a CSV file
A memorandum of understanding about django's QueryDict
How to output the output result of the Linux man command to a file
A note about the python version of python virtualenv
A memorandum about the Python tesseract wrapper library
Output in the form of a python array
A memorandum about matplotlib
A memorandum about Nan.
A story about changing the master name of BlueZ
A reminder about the implementation of recommendations in Python
Set the output destination of the execution result to Vim started as a modeless window
Scraping the result of "Schedule-kun"
A memorandum of kernel compilation
About the ease of Python
A small memorandum of openpyxl
A memorandum about correlation [Python]
A memorandum about Python mock
About the components of Luigi
Filter the output of tracemalloc
About HOG output of Scikit-Image
About the features of Python
A memorandum of using eigen3
A memo about the behavior of bowtie2 during multiple hits
Output the result of gradient descent method as matplotlib animation
A memorandum of understanding for the Python package management tool ez_setup
Save the result of the life game as a gif with python
[Python] A memorandum of beautiful soup4
About the return value of pthread_mutex_init ()
Read the standard output of a subprocess line by line in Python
A memorandum of files under conf.d
About the return value of the histogram.
About the basic type of Go
Process the result of% time,% timeit
About the upper limit of threads-max
Output the result of morphological analysis with Mecab to a WEB browser compatible with Sakura server / UTF-8
About the behavior of yield_per of SqlAlchemy
About the size of matplotlib points
A memorandum of closure survey contents
About the basics list of Python basics
A memorandum regarding the acquisition of the Python3 engineer certification basic exam
The story of writing a program
Understand the number of input / output parameters of a convolutional neural network
Memorandum of introduction of EXODUS, a data model of the finite element method (FEM)
A note about the functions of the Linux standard library that handles time
I tried to verify the result of A / B test by chi-square test
A memorandum of using Python's input function
About the behavior of enable_backprop of Chainer v2
A memorandum of speed of arbitrary degree diagonalization
About the virtual environment of python version 3.7
Measure the relevance strength of a crosstab
Memorandum of python beginners About inclusion notation
A quick overview of the Linux kernel
The result of installing python in Anaconda
About the arguments of the setup function of PyCaret
[python] [meta] Is the type of python a type?
About the Normal Equation of Linear Regression
A memo explaining the axis specification of axis
Get the filename of a directory (glob)
The story of blackjack A processing (python)
Notice the completion of a time-consuming command