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
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
my2to3
Commits
6ed0f179
Commit
6ed0f179
authored
Jul 16, 2020
by
Bryton Lacquement
🚪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qa: division_support
parent
cfa7e896
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
my2to3/fixes/fix_division_support.py
my2to3/fixes/fix_division_support.py
+5
-4
No files found.
my2to3/fixes/fix_division_support.py
View file @
6ed0f179
...
@@ -41,7 +41,8 @@ class FixDivisionSupport(BaseFix):
...
@@ -41,7 +41,8 @@ class FixDivisionSupport(BaseFix):
"""
"""
def
transform
(
self
,
node
,
results
):
def
transform
(
self
,
node
,
results
):
filename
,
lineno
,
id_
=
[
l
.
value
for
l
in
node
.
children
[
1
].
children
[
1
].
children
[:
-
4
:
2
]]
args
=
results
[
'args'
]
filename
,
lineno
,
id_
=
[
l
.
value
for
l
in
args
.
children
[:
-
4
:
2
]]
should_change
,
status
=
analyze_data
(
should_change
,
status
=
analyze_data
(
get_data
(
get_data
(
"division_trace"
,
"division_trace"
,
...
@@ -55,14 +56,14 @@ class FixDivisionSupport(BaseFix):
...
@@ -55,14 +56,14 @@ class FixDivisionSupport(BaseFix):
operator
=
Leaf
(
lib2to3
.
pgen2
.
token
.
DOUBLESLASH
,
"//"
)
operator
=
Leaf
(
lib2to3
.
pgen2
.
token
.
DOUBLESLASH
,
"//"
)
else
:
else
:
operator
=
Leaf
(
lib2to3
.
pgen2
.
token
.
SLASH
,
"/"
)
operator
=
Leaf
(
lib2to3
.
pgen2
.
token
.
SLASH
,
"/"
)
operator
.
prefix
=
node
.
children
[
1
].
children
[
1
]
.
children
[
3
].
prefix
operator
.
prefix
=
args
.
children
[
3
].
prefix
node
.
replace
(
node
.
replace
(
Node
(
Node
(
syms
.
term
,
syms
.
term
,
[
[
node
.
children
[
1
].
children
[
1
]
.
children
[
2
].
clone
(),
args
.
children
[
2
].
clone
(),
operator
,
operator
,
node
.
children
[
1
].
children
[
1
]
.
children
[
4
].
clone
()
args
.
children
[
4
].
clone
()
],
],
prefix
=
node
.
prefix
))
prefix
=
node
.
prefix
))
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