diff options
author | Sean McGinnis <sean.mcginnis@gmail.com> | 2020-05-12 10:49:43 -0500 |
---|---|---|
committer | Sean McGinnis <sean.mcginnis@gmail.com> | 2020-05-19 15:15:53 -0500 |
commit | 824241680182da3650499256b071ad0cdb87a1c8 (patch) | |
tree | 40f7d34c31abbdec5244a5a1e26ed777c63f0287 | |
parent | b1836ad4d2f091fa1825af91c09b3064012997dd (diff) | |
download | oslo-config-824241680182da3650499256b071ad0cdb87a1c8.tar.gz |
Raise hacking minimum to 3.0.1
This raises hacking to a newer version, fixes a few issues the newer
version uncovered, and removes the cap for flake8 to allow that version
to be controlled by the hacking constraints.
Change-Id: Ie550119322bca3c217e4a74eca789f156cfa7e2c
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
-rw-r--r-- | lower-constraints.txt | 1 | ||||
-rw-r--r-- | oslo_config/generator.py | 6 | ||||
-rw-r--r-- | oslo_config/tests/test_generator.py | 12 | ||||
-rw-r--r-- | test-requirements.txt | 3 |
4 files changed, 10 insertions, 12 deletions
diff --git a/lower-constraints.txt b/lower-constraints.txt index 7c453f2..788b173 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -11,7 +11,6 @@ fixtures==3.0.0 flake8==2.5.5 gitdb==0.6.4 GitPython==1.0.1 -hacking==2.0.0 imagesize==0.7.1 iso8601==0.1.11 Jinja2==2.10 diff --git a/oslo_config/generator.py b/oslo_config/generator.py index 1f509ef..8e8dcfe 100644 --- a/oslo_config/generator.py +++ b/oslo_config/generator.py @@ -356,12 +356,12 @@ class _OptFormatter(object): """ self.output_file.write(s) - def writelines(self, l): + def writelines(self, lines): """Write an arbitrary sequence of strings to the output file. - :param l: a list of arbitrary strings + :param lines: a list of arbitrary strings """ - self.output_file.writelines(l) + self.output_file.writelines(lines) def _cleanup_opts(read_opts): diff --git a/oslo_config/tests/test_generator.py b/oslo_config/tests/test_generator.py index becd49a..7db7c60 100644 --- a/oslo_config/tests/test_generator.py +++ b/oslo_config/tests/test_generator.py @@ -437,7 +437,7 @@ class GeneratorTestCase(base.BaseTestCase): ''')), ('choices_opt', dict(opts=[('test', [(None, [opts['choices_opt']])])], - expected='''[DEFAULT] + expected="""[DEFAULT] # # From test @@ -451,7 +451,7 @@ class GeneratorTestCase(base.BaseTestCase): # b - <No description provided> # c - <No description provided> #choices_opt = a -''')), +""")), ('deprecated opt without deprecated group', dict(opts=[('test', [(groups['foo'], @@ -852,13 +852,13 @@ class GeneratorTestCase(base.BaseTestCase): # string with bad default (string value) #string_type_with_bad_default = 4096 ''')), - ('str_opt_str_group', + ('str_opt_str_group', dict(opts=[('test', [('foo', [opts['str_opt']]), (groups['foo'], [opts['int_opt']])]), ('foo', [('foo', - [opts['bool_opt']])])], + [opts['bool_opt']])])], expected='''[DEFAULT] @@ -888,7 +888,7 @@ class GeneratorTestCase(base.BaseTestCase): # Maximum value: 20 #int_opt = 10 ''')), - ('opt_str_opt_group', + ('opt_str_opt_group', dict(opts=[('test', [(groups['foo'], [opts['int_opt']]), ('foo', @@ -924,7 +924,7 @@ class GeneratorTestCase(base.BaseTestCase): # a string (string value) #str_opt = foo bar ''')), - ('opt_with_DeprecatedOpt', + ('opt_with_DeprecatedOpt', dict(opts=[('test', [(None, [opts['opt_with_DeprecatedOpt']])])], expected='''[DEFAULT] diff --git a/test-requirements.txt b/test-requirements.txt index 33e80bd..8441e70 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,8 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -flake8>=3.6.0,<3.8.0 # MIT -hacking>=2.0.0,<2.1.0 # Apache-2.0 +hacking>=3.0.1,<3.1.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD |