RecordFlux
RecordFlux copied to clipboard
Enforce `Final` for module variables
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
.