Update hacking for Python3

The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found by updated hacking version.

Change-Id: I881f5d020d0ea95afb0eab6828928bc386afc263
This commit is contained in:
Andreas Jaeger 2020-03-28 19:41:13 +01:00 committed by Andreas Jaeger
parent 403c9bca39
commit cd956ce134
5 changed files with 7 additions and 7 deletions

View File

@ -22,7 +22,7 @@ import babel
lang_code = sys.argv[1]
try:
l = babel.Locale.parse(lang_code)
print(l.get_display_name())
lo = babel.Locale.parse(lang_code)
print(lo.get_display_name())
except Exception:
print(lang_code)

View File

@ -312,8 +312,8 @@ def _builder_inited(app):
'figure_align': 'H',
'classoptions': ',openany',
'preamble': r"""
\usepackage{""" + pdf_theme_path + """}
\\newcommand{\openstacklogo}{""" + theme_logo + """}
\usepackage{""" + pdf_theme_path + r"""}
\newcommand{\openstacklogo}{""" + theme_logo + """}
"""}

View File

@ -48,7 +48,7 @@ def _get_last_updated_file(src_file):
try:
return datetime.datetime.strptime(last_updated_t,
'%Y-%m-%d %H:%M:%S')
except ValueError as err:
except ValueError:
LOG.info(
'[openstackdocstheme] '
'Could not parse modification time of %s: %r',

View File

@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking>=1.1.0,<1.2.0 # Apache-2.0
hacking>=3.0,<3.1.0 # Apache-2.0
# this is required for the docs build jobs
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD

View File

@ -83,6 +83,6 @@ deps = bindep
commands = bindep test
[flake8]
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools
exclude=.venv,.git,.tox,dist,doc,api-ref,*lib/python*,*egg,tools
show-source = True
enable-extensions = H203,H106