Python does not have constants, and the convention Pylint wants is that module globals are treated as constants and use UPPER_CASE naming style. I believe what we’re doing is:
Module globals set during import are treated as constants and use UPPER_CASE.
Module globals set once, then treated as constant; we use snake_case for these.
True global variables, snake_case.
Groups 1 and 2 should be set once only and constant after that. I don't know how many 3 we have.
Pylint also just doesn’t want us to use global at all which honestly makes sense.
Split from #1860. Pylint:
https://github.com/hpc/charliecloud/blob/d67937332094a7d8de8e9bd2e112d30d117c50c0/lib/build_cache.py#L140-L144
Python does not have constants, and the convention Pylint wants is that module globals are treated as constants and use UPPER_CASE naming style. I believe what we’re doing is:
Module globals set during import are treated as constants and use UPPER_CASE.
Module globals set once, then treated as constant; we use snake_case for these.
True global variables, snake_case.
Groups 1 and 2 should be set once only and constant after that. I don't know how many 3 we have.
Pylint also just doesn’t want us to use
global
at all which honestly makes sense.