diff options
| author | Peter Odding <peter@peterodding.com> | 2014-07-14 21:40:35 +0200 | 
|---|---|---|
| committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-09-29 11:44:32 -0500 | 
| commit | 97f45302f16c64c5e3af1a895f4906857f3a5100 (patch) | |
| tree | 348023ccaab42712198bf4bae5276a72c7939e79 | |
| parent | 6c1e9ef571c0f78dc252e7ddd43a577f1504da39 (diff) | |
| download | cryptography-97f45302f16c64c5e3af1a895f4906857f3a5100.tar.gz cryptography-97f45302f16c64c5e3af1a895f4906857f3a5100.tar.bz2 cryptography-97f45302f16c64c5e3af1a895f4906857f3a5100.zip | |
Fix PEP-8 violations
| -rw-r--r-- | setup.py | 15 | 
1 files changed, 10 insertions, 5 deletions
| @@ -199,31 +199,36 @@ def keywords_with_side_effects(argv):          'sdist',          'upload',      ) +      def is_short_option(argument):          """Check whether a command line argument is a short option."""          return len(argument) >= 2 and argument[0] == '-' and argument[1] != '-' +      def expand_short_options(argument):          """Expand combined short options into canonical short options."""          return ('-' + char for char in argument[1:]) +      def argument_without_setup_requirements(argv, i):          """Check whether a command line argument needs setup requirements."""          if argv[i] in no_setup_requires_arguments:              # Simple case: An argument which is either an option or a command              # which doesn't need setup requirements.              return True -        elif is_short_option(argv[i]) and all(option in -                no_setup_requires_arguments for option in -                expand_short_options(argv[i])): +        elif (is_short_option(argv[i]) and +              all(option in no_setup_requires_arguments +                  for option in expand_short_options(argv[i]))):              # Not so simple case: Combined short options none of which need              # setup requirements.              return True -        elif argv[i - 1 : i] == ['--egg-base']: +        elif argv[i - 1:i] == ['--egg-base']:              # Tricky case: --egg-info takes an argument which should not make              # us use setup_requires (defeating the purpose of this code).              return True          else:              return False -    if all(argument_without_setup_requirements(argv, i) for i in range(1, len(argv))): + +    if all(argument_without_setup_requirements(argv, i) +           for i in range(1, len(argv))):          return {              "cmdclass": {                  "build": DummyCFFIBuild, | 
