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
|
@ -133,4 +133,4 @@ class SearchResource(command.Lister):
|
|||
return (columns, result)
|
||||
|
||||
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):
|
||||
"""Escape slashes in querystrings so not to be treated as regexp"""
|
||||
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'],
|
||||
all_projects=False, type=None)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# process, which may cause wedges in the gate later.
|
||||
|
||||
# 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
|
||||
fixtures>=3.0.0 # Apache-2.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>
|
||||
"""
|
||||
print help % dict(project=project, venv=venv, root=root)
|
||||
print(help % dict(project=project, venv=venv, root=root))
|
||||
|
||||
|
||||
def main(argv):
|
||||
|
@ -70,5 +70,6 @@ def main(argv):
|
|||
install.install_dependencies()
|
||||
print_help(project, venv, root)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
||||
|
|
Loading…
Reference in New Issue