From 044dcfbf8885d0115e64cf75f74a0f40f54e2370 Mon Sep 17 00:00:00 2001 From: Austin Morton Date: Sat, 26 Sep 2020 16:59:26 -0400 Subject: Use ES6 Modules (#2132) --- lib/compilers/python.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'lib/compilers/python.js') 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; -- cgit v1.2.3