We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5d090c5 + 98b48d2 commit a332816Copy full SHA for a332816
harmonizer/refactorer.py
@@ -15,6 +15,11 @@
15
16
import black
17
18
+try:
19
+ from ast import unparse
20
+except ImportError:
21
+ from astunparse import unparse as unparse
22
+
23
24
class Refactorer:
25
"""
@@ -85,7 +90,7 @@ def suggest_dimensional_split(self) -> str:
85
90
86
91
# Fix missing location info and unparse the entire module
87
92
ast.fix_missing_locations(new_module)
88
- unformatted_code = ast.unparse(new_module)
93
+ unformatted_code = unparse(new_module)
89
94
95
# Format the generated code using black
96
try:
requirements.txt
@@ -1,5 +1,7 @@
1
pytest
2
black==24.4.2
3
+astunparse==1.6.3
4
5
flake8
6
isort
7
pre-commit
0 commit comments