RecordFlux icon indicating copy to clipboard operation
RecordFlux copied to clipboard

Enforce `Final` for module variables

Open senier opened this issue 3 years ago • 0 comments

Writing to module variables can be non-deterministic and have undesired consequences (especially, in concurrent setups). While pylint rejects direct assignment to constants, it cannot detect cases where a method updates the "constant" (e.g. MY_CONST.append(mydata)).

To avoid this problem, all package variables should be considered Final.

Implement a pylint plugin to check that all module variables are Final.

senier avatar Jun 17 '21 14:06 senier