facebook pixelCodiga Analysis Python Rules, category design
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.

R0124

Design
Warning

Comparison with same value

Learn more

R0201

Design
Informational

Does not use self

R0202

Design
Warning

No classmethod decorator

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

R0914

Design
Warning

Too many local variables

R0915

Design
Warning

Too many statements, split your functions in smaller functions

R0916

Design
Warning

Too many boolean expressions in if statement

R1701

Design
Informational

Multiple calls of isinstance calls can be merged

R1702

Design
Warning

Too many nested blocks

R1703

Design
Warning

The if statement can be replaced with a return and a boolean expression

R1704

Design
Informational

Redefining argument with local name

R1705

Design
Warning

Unnecessary else after return

R1706

Design
Informational

Consider using ternary operator

R1708

Design
Error

Do not raise StopIteration in generator

R1710

Design
Error

Inconsistent return type in function

R1711

Design
Informational

Useless return at end of function or method

R1716

Design
Warning

Simplify chained comparison between the operands

R1717

Design
Informational

Consider using a dictionary comprehension

R1718

Design
Informational

Consider using a set comprehension

R1719

Design
Error

Conditions can be simplified

R1720

Design
Warning

Unnecessary else after raise

R1721

Design
Warning

Unnecessary use of a comprehension

R1723

Design
Warning

Unnecessary elif after break

R1724

Design
Warning

Unnecessary elif after continue

W0107

Design
Warning

Unnecessary pass statement

W0108

Design
Error

Lambda may not be necessary

W0125

Design
Warning

Conditional statement with a constant value

W0127

Design
Error

Assigning a variable to itself

W0150

Design
Warning

return statement in finally block may swallow exception

W0201

Design
Error

Attribute defined outside __init__

W0211

Design
Error

Static method with self as first argument

W0212

Design
Warning

Access to a protected member of a client class

W0221

Design
Error

Parameters differ from overridden method

W0222

Design
Warning

Signature is different than in the implemented interface or in an overridden method

W0223

Design
Error

Abstract method not overriden

W0231

Design
Warning

__init__ method from base class is not called in inherited class

W0233

Design
Error

An __init__ method is called on a class which is not in the direct ancestors for the analyzed class

W0235

Design
Warning

Useless super delegation

W0236

Design
Error

Invalid overridden method

W0604

Design
Error

Using the global statement at the module level

W0621

Design
Error

Redefining name from outer scope

W0622

Design
Error

Redefining built-in from Python

W0640

Design
Error

Use variable in closure when defined in a loop

W0642

Design
Warning

Invalid assignment to cls or self

W0702

Design
Error

Not using specific exception in an except statement

W0703

Design
Error

Catching too general exception

W0705

Design
Error

Catching the same exception twice

W0706

Design
Error

Use the right exception when raising an exception in an except block

W1113

Design
Warning

Keyword argument before variable positional arguments list

W1114

Design
Warning

Positional arguments appear to be out of order

R1709

Design
Warning

https://vald-phoenix.github.io/pylint-errors/plerr/errors/refactoring/R1709

R1726

Design
Warning

Boolean expression can be simplified

W0246

Design
Error

Useless parent or super() delegation