facebook pixelCodiga Analysis Python Rules, severity informational
BACK TO LIST

Python rules

The Codiga Static Analysis engine is powered by the best open-source tools to check your Python code. Make sure your code does not have any security issues and follow design and other best practices. Automate your code reviews today and merge with confidence with Codiga.

C0111

Documentation
Informational

Missing docstring on module, function, class or method

Learn more

C0112

Code style
Informational

Module, function, class or method have an empty docstring

C0113

Best practice
Informational

Detect inappropriate use of the not keyword

C0116

Documentation
Informational

Missing docstring on a function

C0121

Best practice
Informational

Check when valid is compared to True, False or None (and can be replaced by simpler expressions)

C0144

Best practice
Informational

Detect when a name contains at least one non-ASCII unicode character

C0202

Code style
Informational

Detect when a class method has a first argument named differently than the value specified in valid-classmethod-first-arg option

C0203

Code style
Informational

Detect when a metaclass method has a first argument named differently than the value specified in valid-classmethod-first-arg option.

C0204

Code style
Informational

Metaclass class method __new__ should have 'cls' as first argument

C0302

Code style
Informational

Too many lines in a module

C0304

Code style
Informational

Final newline missing

C0305

Best practice
Informational

Trailing newlines

C0326

Code style
Informational

Bad whitespace

C0327

Code style
Informational

Mixed line endings (between LF and CRLF)

C0330

Code style
Informational

Wrong indentation

C0412

Best practice
Informational

Imports are not grouped

C0413

Best practice
Informational

Import and code are mixed

C0414

Best practice
Informational

Import alias is same as original package

R0201

Design
Informational

Does not use self

R0205

Design
Informational

Class inherits from object

R0206

Design
Informational

Cannot have defined parameters for properties

R0801

Design
Informational

Similar lines detection

R0901

Design
Informational

Too many ancestors

R0902

Design
Informational

Too many instance attributes

R0903

Design
Informational

Too few public methods

R0904

Design
Informational

Too many public methods

R0911

Design
Informational

Too many return statements

R0912

Design
Informational

Too many branches

R0913

Design
Informational

Too many arguments for a function or method

R1701

Design
Informational

Multiple calls of isinstance calls can be merged

R1704

Design
Informational

Redefining argument with local name

R1706

Design
Informational

Consider using ternary operator

R1711

Design
Informational

Useless return at end of function or method

R1717

Design
Informational

Consider using a dictionary comprehension

R1718

Design
Informational

Consider using a set comprehension

R1722

Best practice
Informational

Use sys.exit()

W0511

Best practice
Informational

Use TODO, not FIXME

C0102

Code style
Informational

Detect blacklisted names (toto, foo, etc)

C0209

Code style
Informational

Use a f-string

R1731

Best practice
Informational

Using the max builtin instead of a conditional improves readability and conciseness

R1735

Best practice
Informational

Using dict() to create an empty dictionary instead of the literal {}. The literal is faster as it avoids an additional function call.

W1310

Error prone
Informational

String that does not have any interpolation variables, in which case it can be either a normal string without formatting or a bug in the code.

W0410

Code style
Informational

__future__ import is not the first non docstring statement

E2502

Best practice
Informational

Contains control characters that can permit obfuscated code executed differently than displayed.

C0105

Code style
Informational

Name doesn't conform to naming rules associated to its type