Update hacking for Python3
The repo is Python 3 now, so update hacking to version 2.0 which supports Python 3. fix issues found by flake8. Change-Id: I2f14cb6f67a0c9b4c0dcbf8d93c26eb99b9b9d33
This commit is contained in:
parent
157f0c0ae7
commit
77cdf205d4
@ -164,6 +164,7 @@ def add_command_parsers(subparsers):
|
|||||||
"expiration point")
|
"expiration point")
|
||||||
parser.set_defaults(func=expire_old)
|
parser.set_defaults(func=expire_old)
|
||||||
|
|
||||||
|
|
||||||
command_opt = cfg.SubCommandOpt('command',
|
command_opt = cfg.SubCommandOpt('command',
|
||||||
title='Command',
|
title='Command',
|
||||||
help='Available commands',
|
help='Available commands',
|
||||||
@ -183,5 +184,6 @@ def main():
|
|||||||
db_api.get_session()
|
db_api.get_session()
|
||||||
CONF.command.func(config, CONF.command.name)
|
CONF.command.func(config, CONF.command.name)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
@ -85,6 +85,7 @@ def run_migrations_online():
|
|||||||
with context.begin_transaction():
|
with context.begin_transaction():
|
||||||
context.run_migrations()
|
context.run_migrations()
|
||||||
|
|
||||||
|
|
||||||
if context.is_offline_mode():
|
if context.is_offline_mode():
|
||||||
run_migrations_offline()
|
run_migrations_offline()
|
||||||
else:
|
else:
|
||||||
|
@ -27,9 +27,9 @@ down_revision = None
|
|||||||
branch_labels = None
|
branch_labels = None
|
||||||
depends_on = None
|
depends_on = None
|
||||||
|
|
||||||
from alembic import context
|
from alembic import context # noqa: E402
|
||||||
from alembic import op
|
from alembic import op # noqa: E402
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa # noqa: E402
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
|
@ -27,9 +27,9 @@ down_revision = 'cb0e61ce633e'
|
|||||||
branch_labels = None
|
branch_labels = None
|
||||||
depends_on = None
|
depends_on = None
|
||||||
|
|
||||||
from alembic import context
|
from alembic import context # noqa: E402
|
||||||
from alembic import op
|
from alembic import op # noqa: E402
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa # noqa: E402
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
|
@ -25,8 +25,8 @@ down_revision = '79dead6f7c26'
|
|||||||
branch_labels = None
|
branch_labels = None
|
||||||
depends_on = None
|
depends_on = None
|
||||||
|
|
||||||
from alembic import op
|
from alembic import op # noqa: E402
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa # noqa: E402
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
|
@ -27,8 +27,8 @@ down_revision = '52dfb338f74e'
|
|||||||
branch_labels = None
|
branch_labels = None
|
||||||
depends_on = None
|
depends_on = None
|
||||||
|
|
||||||
from alembic import op
|
from alembic import op # noqa: E402
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa # noqa: E402
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
|
|
||||||
hacking<0.11,>=0.10.0
|
hacking>=2.0,<2.1 # Apache-2.0
|
||||||
|
|
||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
python-subunit>=0.0.18 # Apache-2.0/BSD
|
python-subunit>=0.0.18 # Apache-2.0/BSD
|
||||||
|
5
tox.ini
5
tox.ini
@ -68,9 +68,10 @@ commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenote
|
|||||||
# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126
|
# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126
|
||||||
# E129 skipped because it is too limiting when combined with other rules
|
# E129 skipped because it is too limiting when combined with other rules
|
||||||
# E711 skipped because sqlalchemy filter() requires using == instead of is
|
# E711 skipped because sqlalchemy filter() requires using == instead of is
|
||||||
|
# W503 line break before binary operator
|
||||||
|
# W504 line break after binary operator
|
||||||
show-source = True
|
show-source = True
|
||||||
ignore = E123,E125,E129,E711
|
ignore = E123,E125,E129,E711,W503,W504
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,releasenotes
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,releasenotes
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user