From 42e5bf91b0a851494650b31655c8f1f6c1859752 Mon Sep 17 00:00:00 2001
From: Sunil Shetye
Date: Mon, 15 Nov 2021 12:21:06 +0530
Subject: fix some code issues
---
README.md | 6 ++++++
.../src/components/SchematicEditor/Helper/SchematicEditor.css | 4 ++--
blocks/eda-frontend/src/components/Shared/Graph.js | 4 ++--
blocks/simulationAPI/helpers/ngspice_helper.py | 6 ++----
4 files changed, 12 insertions(+), 8 deletions(-)
create mode 100644 README.md
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..2e14961b
--- /dev/null
+++ b/README.md
@@ -0,0 +1,6 @@
+
+ Common Interface Project
+
+
+ [](https://www.codefactor.io/repository/github/FOSSEE/Common-Interface-Project)
+
diff --git a/blocks/eda-frontend/src/components/SchematicEditor/Helper/SchematicEditor.css b/blocks/eda-frontend/src/components/SchematicEditor/Helper/SchematicEditor.css
index 7cd992c0..fa8e252b 100644
--- a/blocks/eda-frontend/src/components/SchematicEditor/Helper/SchematicEditor.css
+++ b/blocks/eda-frontend/src/components/SchematicEditor/Helper/SchematicEditor.css
@@ -12,7 +12,7 @@
border-radius: 5px;
transform: scale(1.2);
padding: 3px;
- box-shadow: 0px 0px 41px 17px rgba(207,218,225,0.68);
+ box-shadow: 0 0 41px 17px rgba(207,218,225,0.68);
}
/* Schematic Editer Grid */
@@ -91,7 +91,7 @@ html {
overflow-x: hidden;
}
::-webkit-scrollbar {
- width: 0px; /* Remove scrollbar space */
+ width: 0; /* Remove scrollbar space */
background: transparent; /* Optional: just make scrollbar invisible */
}
/* Optional: show position indicator in red */
diff --git a/blocks/eda-frontend/src/components/Shared/Graph.js b/blocks/eda-frontend/src/components/Shared/Graph.js
index c0e62423..481f2e2d 100644
--- a/blocks/eda-frontend/src/components/Shared/Graph.js
+++ b/blocks/eda-frontend/src/components/Shared/Graph.js
@@ -35,9 +35,9 @@ class Graph extends Component {
if (typeof lineGraph !== 'undefined') lineGraph.destroy()
const dataset = () => {
- var arr = []
+ const arr = []
- for (var i = 0; i < y.length; i++) {
+ for (let i = 0; i < y.length; i++) {
if (labels[0] === labels[i + 1]) continue
arr.push({
label: labels[i + 1],
diff --git a/blocks/simulationAPI/helpers/ngspice_helper.py b/blocks/simulationAPI/helpers/ngspice_helper.py
index ad1e9940..a3d51fdb 100644
--- a/blocks/simulationAPI/helpers/ngspice_helper.py
+++ b/blocks/simulationAPI/helpers/ngspice_helper.py
@@ -3,7 +3,6 @@ import logging
import subprocess
from pathlib import Path
from django.conf import settings
-from .parse import extract_data_from_ngspice_output
logger = logging.getLogger(__name__)
MxGraphParser = os.path.join(settings.BASE_DIR, '../Xcos/MxGraphParser.py')
@@ -28,8 +27,7 @@ SCILAB_CMD = [SCILAB,
class CannotRunParser(Exception):
- """Base class for exceptions in this module."""
- pass
+ """ Base class for exceptions in this module. """
def ExecXml(filepath, file_id, parameters):
@@ -74,7 +72,7 @@ def ExecXml(filepath, file_id, parameters):
logger.info('Ran %s', SCILAB_CMD[0])
return "Success"
- except Exception as e:
+ except Exception:
logger.exception('Encountered Exception:')
logger.info('removing %s', filepath)
os.remove(filepath)
--
cgit