Add __future__ imports to increase compatibility with Python 3. Derive Option from object to make it a new-style class for Python 3 compatibility.
This commit is contained in:
parent
d7acd29ad5
commit
49a73d0901
3 changed files with 4 additions and 2 deletions
|
@ -8,7 +8,7 @@
|
||||||
# option. This file may not be copied, modified, or distributed
|
# option. This file may not be copied, modified, or distributed
|
||||||
# except according to those terms.
|
# except according to those terms.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
import argparse
|
import argparse
|
||||||
import contextlib
|
import contextlib
|
||||||
import datetime
|
import datetime
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
"""Bootstrap tests"""
|
"""Bootstrap tests"""
|
||||||
|
|
||||||
|
from __future__ import absolute_import, division, print_function
|
||||||
import os
|
import os
|
||||||
import doctest
|
import doctest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
# ignore-tidy-linelength
|
# ignore-tidy-linelength
|
||||||
|
|
||||||
|
from __future__ import absolute_import, division, print_function
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
rust_dir = os.path.dirname(os.path.abspath(__file__))
|
rust_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
@ -19,7 +20,7 @@ rust_dir = os.path.dirname(rust_dir)
|
||||||
sys.path.append(os.path.join(rust_dir, "src", "bootstrap"))
|
sys.path.append(os.path.join(rust_dir, "src", "bootstrap"))
|
||||||
import bootstrap
|
import bootstrap
|
||||||
|
|
||||||
class Option:
|
class Option(object):
|
||||||
def __init__(self, name, rustbuild, desc, value):
|
def __init__(self, name, rustbuild, desc, value):
|
||||||
self.name = name
|
self.name = name
|
||||||
self.rustbuild = rustbuild
|
self.rustbuild = rustbuild
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue