pulp/pulp-smash

pulp_smash_cli.settings_create is at capacity, generating "too-many-locals" warnings

Closed this issue · 0 comments

Issue

  1. Describe what you expected to happen.

pulp_smash lint tests should pass cleanly

  1. Describe what actually happened.

Python lint tests warn (well, after #975 is merged) due to too many locals in the pulp_smash.pulp_smash_cli.settings_create function. This change is directly caused by the addition of the selinux_enabled flag in #975.

  1. Describe what version of Pulp and what OS is affected by the issue.

n/a

  1. State steps to re-create the issue.
(pulp-smash) [vagrant@pulp2 pulp-smash]$ make lint
flake8 . --ignore E501,F401 --exclude docs/_build
pylint -j 4 --reports=n --disable=I \
        docs/conf.py \
        pulp_smash \
        scripts/run_functional_tests.py \
        setup.py \
        tests
No config file found, using default configuration
************* Module pulp_smash.pulp_smash_cli
R: 44, 0: Too many local variables (16/15) (too-many-locals)

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
  1. If there is a related pulp.plan.io issue, link to it, and set the "smash test" field.

n/a

  1. Choose proper labels. See: Smash Labels

Plan?

Proposed Solution

Briefly discussed, but basically we may want to split out the settings_create into smaller functions to build up the larger configuration. (pulp, server, role, etc).