Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
my2to3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Emmy Vouriot
my2to3
Commits
f5adf0ab
Commit
f5adf0ab
authored
Jul 15, 2020
by
Bryton Lacquement
🚪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! division_support: record the status of each modification
This fixes commit
3817aa59
.
parent
0d19c086
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
my2to3/fixes/fix_division_support.py
my2to3/fixes/fix_division_support.py
+2
-2
my2to3/trace.py
my2to3/trace.py
+1
-1
No files found.
my2to3/fixes/fix_division_support.py
View file @
f5adf0ab
...
...
@@ -4,7 +4,7 @@ from lib2to3.pygram import python_symbols as syms
from
lib2to3.pytree
import
Leaf
,
Node
import
os
from
my2to3.trace
import
get_data
from
my2to3.trace
import
create_table
,
get_data
from
my2to3.util
import
add_future
,
data2types
...
...
@@ -39,7 +39,7 @@ class FixDivisionSupport(BaseFix):
def
transform
(
self
,
node
,
results
):
filename
,
lineno
,
id_
=
[
l
.
value
for
l
in
node
.
children
[
1
].
children
[
1
].
children
[:
-
4
:
2
]]
data
=
get_data
(
"division"
,
[
"dividend_type"
,
"divisor_type"
],
dict
(
filename
=
filename
,
lineno
=
lineno
,
id
=
id_
))
data
=
get_data
(
"division
_trace
"
,
[
"dividend_type"
,
"divisor_type"
],
dict
(
filename
=
filename
,
lineno
=
lineno
,
id
=
id_
))
if
not
data
:
return
...
...
my2to3/trace.py
View file @
f5adf0ab
...
...
@@ -55,7 +55,7 @@ def get_data(table, columns_to_select='*', conditions={}):
table
,
)
if
conditions
:
query
+=
"WHERE "
+
' AND '
.
join
(
k
+
" = "
+
v
for
k
,
v
in
conditions
.
items
())
query
+=
"
WHERE "
+
' AND '
.
join
(
k
+
" = "
+
v
for
k
,
v
in
conditions
.
items
())
try
:
return
c
.
execute
(
query
).
fetchall
()
finally
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment