From 73c14c4bd382823c1195f3d8c87e866bec735bc5 Mon Sep 17 00:00:00 2001 From: Johannes Wilm Date: Thu, 24 Oct 2024 18:51:54 +0200 Subject: [PATCH] lint --- lint/django_import_resolver.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lint/django_import_resolver.js b/lint/django_import_resolver.js index 8f2be71..941c9fe 100644 --- a/lint/django_import_resolver.js +++ b/lint/django_import_resolver.js @@ -1,15 +1,20 @@ const path = require("path") const fs = require("fs") const acorn = require("acorn") -const { execSync } = require('child_process') +const {execSync} = require("child_process") function getFidusWriterPath() { try { return execSync( - 'python -c "import fiduswriter; print(next(filter(lambda path: \'/site-packages/\' in path, fiduswriter.__path__), \'\'))"' - ).toString().trim() + "python -c \"import fiduswriter; print(next(filter(lambda path: '/site-packages/' in path, fiduswriter.__path__), ''))\"" + ) + .toString() + .trim() } catch (error) { - console.error('Failed to find Fidus Writer installation:', error.message) + console.error( + "Failed to find Fidus Writer installation:", + error.message + ) process.exit(1) } } @@ -48,9 +53,7 @@ function resolveFilelocation(source, file, appsPaths) { const returnValue = {found: false, path: null} const fullPath = path.resolve(path.dirname(file), source) - if ( - fullPath.includes("/plugins/") - ) { + if (fullPath.includes("/plugins/")) { returnValue.found = true returnValue.path = null return returnValue