Commit 55391639 authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

trace: add comments about tasks to do

/cc @jm
parent 1b97b2ea
......@@ -7,6 +7,7 @@ from lib2to3.pytree import Node
from . import BaseDynamicTraceFix
from my2to3.util import parse_type
# TODO: /=
class FixDivisionTrace(BaseDynamicTraceFix):
"""Rewrites a / b into division_traced(..., a, b)
......
......@@ -28,6 +28,8 @@ except Exception as e:
except Exception as e:
print(e)
raise
TODO: this does not cover all cases
"""
basename = "nested_except"
traced_information = "lineno_parent", "lineno_child"
......
......@@ -6,6 +6,7 @@ from lib2to3.refactor import get_fixers_from_package, RefactoringTool
database = "my2to3_traces.db"
@contextmanager
def connection():
# XXX: do not reopen all the time
conn = sqlite3.connect(database)
try:
with conn:
......@@ -19,6 +20,7 @@ tracing_functions = []
def create_table(table, *columns):
with connection() as conn:
v = ', '.join(columns)
# BUG: not unique if there are NULL values
conn.execute(
"CREATE TABLE IF NOT EXISTS %s (%s, UNIQUE (%s))" % (table, v, v)
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment