WPS201 is reported in an __init__.py file that is used as a public module.
Such modules often re-export multiple objects to provide a convenient import surface.
Example:
from myapp.infra.dtos.example_parts.example_first import ExampleFirst as ExampleFirst
from myapp.infra.dtos.example_parts.example_second import ExampleSecond as ExampleSecond
Example usage:
from myapp.infra.dtos.example import example_parts
example_parts.ExampleFirst
example_parts.ExampleSecond
Expected behavior:
__init__.py acting as a public namespace module should not trigger WPS201.
Possible solutions:
Exclude __init__.py from WPS201.
WPS201is reported in an__init__.pyfile that is used as a public module.Such modules often re-export multiple objects to provide a convenient import surface.
Example:
Example usage:
Expected behavior:
__init__.pyacting as a public namespace module should not triggerWPS201.Possible solutions:
Exclude
__init__.pyfromWPS201.