Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Fix problems found. Change-Id: Ic78f1a2f958530fe7e480c7043c604d9f0e978c3
This commit is contained in:
parent
d307e8e6ed
commit
e36c940ba7
|
@ -245,8 +245,8 @@ def format_parameter_file(param_files, template_file=None,
|
||||||
|
|
||||||
param_file = {}
|
param_file = {}
|
||||||
for key, value in iter(params.items()):
|
for key, value in iter(params.items()):
|
||||||
param_file[key] = resolve_param_get_file(value,
|
param_file[key] = resolve_param_get_file(value,
|
||||||
template_base_url)
|
template_base_url)
|
||||||
return param_file
|
return param_file
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -133,4 +133,4 @@ class SearchResource(command.Lister):
|
||||||
return (columns, result)
|
return (columns, result)
|
||||||
|
|
||||||
def _modify_query_string(self, query_string):
|
def _modify_query_string(self, query_string):
|
||||||
return query_string.replace('/', '\/')
|
return query_string.replace(r'/', r'\/')
|
||||||
|
|
|
@ -87,7 +87,7 @@ class TestSearchResource(TestSearch):
|
||||||
def test_search_regexp_slashes_in_query_string(self):
|
def test_search_regexp_slashes_in_query_string(self):
|
||||||
"""Escape slashes in querystrings so not to be treated as regexp"""
|
"""Escape slashes in querystrings so not to be treated as regexp"""
|
||||||
self._test_search(["this/has/some/slashes"],
|
self._test_search(["this/has/some/slashes"],
|
||||||
query={"query_string": {"query": "this\/has\/some\/slashes"}},
|
query={"query_string": {"query": r"this\/has\/some\/slashes"}},
|
||||||
_source=['id', 'name', 'updated_at'],
|
_source=['id', 'name', 'updated_at'],
|
||||||
all_projects=False, type=None)
|
all_projects=False, type=None)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
|
|
||||||
# Hacking already pins down pep8, pyflakes and flake8
|
# Hacking already pins down pep8, pyflakes and flake8
|
||||||
hacking>=1.1.0,<1.2.0 # Apache-2.0
|
hacking>=3.0,<3.1.0 # Apache-2.0
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
mock>=2.0.0 # BSD
|
mock>=2.0.0 # BSD
|
||||||
|
|
|
@ -42,7 +42,7 @@ def print_help(project, venv, root):
|
||||||
|
|
||||||
$ %(root)s/tools/with_venv.sh <your command>
|
$ %(root)s/tools/with_venv.sh <your command>
|
||||||
"""
|
"""
|
||||||
print help % dict(project=project, venv=venv, root=root)
|
print(help % dict(project=project, venv=venv, root=root))
|
||||||
|
|
||||||
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
|
@ -70,5 +70,6 @@ def main(argv):
|
||||||
install.install_dependencies()
|
install.install_dependencies()
|
||||||
print_help(project, venv, root)
|
print_help(project, venv, root)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main(sys.argv)
|
main(sys.argv)
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -65,7 +65,7 @@ commands =
|
||||||
make -C doc/build/pdf
|
make -C doc/build/pdf
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = E123,E126,E128,E241,E265,E713,H202,H405,H238
|
ignore = E123,E126,E128,E241,E265,E713,H202,H405,H238,W504
|
||||||
show-source = True
|
show-source = True
|
||||||
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build
|
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build
|
||||||
max-complexity=20
|
max-complexity=20
|
||||||
|
|
Loading…
Reference in New Issue