Explicitly set the module level platform variable

rather than implicitly setting the variable in reset_platform().

Prompted by "W0601: Global variable %r undefined at the module level" pylint
error.

Signed-off-by: mulhern <amulhern@redhat.com>
Disable W0703 message in test

If sorting throws any exception then this test has failed.

Signed-off-by: mulhern <amulhern@redhat.com>
Remove unnecessary global statements

The global statements are not needed to make the operations refer to the
globally defined variable. They would be needed, if an assignment were done
to the variable in any of the methods where it is declared global, but no
assignments are done, only mutating operations.

Signed-off-by: mulhern <amulhern@redhat.com>
Do not do formatting operation in the argument of the translation

Signed-off-by: mulhern <amulhern@redhat.com>
Suppress W0631 warning for abbr and prefix.

The only way these variables could be undefined is if _xlated_prefixes()
is empty. But, _xlated_prefixes() will only be empty if both _binaryPrefix and
_decimalPrefix are empty, which is unlikely in the extreme.

Signed-off-by: mulhern <amulhern@redhat.com>
Obvious fix inspired by pylint E0602 error

Message was "Undefined variable '_LOOP_DEV0'"

Signed-off-by: mulhern <amulhern@redhat.com>
Get _loopMap.values() when all that's needed is the values

Also, get the values when the values, not the keys, are what is needed.

Signed-off-by: mulhern <amulhern@redhat.com>
Suppress some correct pylint warnings

These tests verify the property that pylint warns about.

Signed-off-by: mulhern <amulhern@redhat.com>
Make signature of setup() in parent class same as in children

Signed-off-by: mulhern <amulhern@redhat.com>
Add W0105 warning about attribute docstrings to false positives

These strings are valid "attribute docstrings" according to PEP257
(legacy.python.org/dev/peps/pep-0257/#what-is-a-docstring).

Signed-off-by: mulhern <amulhern@redhat.com>
Suppress unused variable warning and check for failure.

On the off chance that the partitioning on "=" failed, do not set a value.

Signed-off-by: mulhern <amulhern@redhat.com>
Make regular expressions raw strings.

Signed-off-by: mulhern <amulhern@redhat.com>
Make loop variables a little more descriptive

Fixes some subtly erroneous "Using possibly undefined loop variable" errors,
but also makes the code clearer.

Signed-off-by: mulhern <amulhern@redhat.com>
Simplify find_library and fix redefining built-in errors.

file -> lfile
dir -> ldir

Since only the path of the first file is returned, only calculate that path.

Signed-off-by: mulhern <amulhern@redhat.com>
Slightly rewrite loop to avoid a redefining builtin error

More elegant than changing the name.

Signed-off-by: mulhern <amulhern@redhat.com>
Slightly reduce loop and get rid of obsolete comment

Prompted by an "Unused variable" pylint warning.

Signed-off-by: mulhern <amulhern@redhat.com>