aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/python.js
diff options
context:
space:
mode:
authorAustin Morton <apmorton@users.noreply.github.com>2020-09-26 16:59:26 -0400
committerGitHub <noreply@github.com>2020-09-26 16:59:26 -0400
commit044dcfbf8885d0115e64cf75f74a0f40f54e2370 (patch)
tree1dcc3e27139600d8e85004dc2a840bb420ccc835 /lib/compilers/python.js
parentbac07fea6d2d4ed5fb7070c51e4cf3e56e3c155a (diff)
downloadcompiler-explorer-044dcfbf8885d0115e64cf75f74a0f40f54e2370.tar.gz
compiler-explorer-044dcfbf8885d0115e64cf75f74a0f40f54e2370.zip
Use ES6 Modules (#2132)
Diffstat (limited to 'lib/compilers/python.js')
-rw-r--r--lib/compilers/python.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/compilers/python.js b/lib/compilers/python.js
index 843024552..4afd6acd5 100644
--- a/lib/compilers/python.js
+++ b/lib/compilers/python.js
@@ -22,11 +22,12 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
-const BaseCompiler = require('../base-compiler'),
- argumentParsers = require('./argument-parsers'),
- path = require('path');
+import { BaseCompiler } from '../base-compiler';
+import { resolvePathFromAppRoot } from '../utils';
-class PythonCompiler extends BaseCompiler {
+import { BaseParser } from './argument-parsers';
+
+export class PythonCompiler extends BaseCompiler {
static get key() { return 'python'; }
constructor(compilerInfo, env) {
@@ -68,7 +69,7 @@ class PythonCompiler extends BaseCompiler {
getDisasmScriptPath() {
const script = this.compilerProps('disasmScript');
- return script || path.resolve(__dirname, '..', '..', 'etc', 'scripts', 'dis_all.py');
+ return script || resolvePathFromAppRoot('etc', 'scripts', 'dis_all.py');
}
optionsForFilter(filters, outputFilename) {
@@ -80,8 +81,6 @@ class PythonCompiler extends BaseCompiler {
}
getArgumentParser() {
- return argumentParsers.Base;
+ return BaseParser;
}
}
-
-module.exports = PythonCompiler;