-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfix_tests2.py
More file actions
16 lines (14 loc) · 775 Bytes
/
fix_tests2.py
File metadata and controls
16 lines (14 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import os
fixes = {
"quantwave-core/src/indicators/amfm.rs": ("VecDeque::with_capacity(avg_len)", "VecDeque::with_capacity(20)"),
"quantwave-core/src/indicators/ehlers_ultimate_oscillator.rs": ("VecDeque::with_capacity(period)", "VecDeque::with_capacity(20)"),
"quantwave-core/src/indicators/mesa_stochastic.rs": ("VecDeque::with_capacity(2 * period)", "VecDeque::with_capacity(40)"),
"quantwave-core/src/indicators/synthetic_oscillator.rs": ("VecDeque::with_capacity(2 * length)", "VecDeque::with_capacity(40)")
}
for file, (old, new) in fixes.items():
if os.path.exists(file):
with open(file, "r") as f:
content = f.read()
content = content.replace(old, new)
with open(file, "w") as f:
f.write(content)