summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Shetye2021-11-15 12:21:06 +0530
committerSunil Shetye2021-11-15 12:22:45 +0530
commit42e5bf91b0a851494650b31655c8f1f6c1859752 (patch)
treea5887dc801b3b6620f96918fe0453f51a9b44932
parent9941fdf3a6200bb10bd0e6373a2654cb30da5ccf (diff)
downloadCommon-Interface-Project-42e5bf91b0a851494650b31655c8f1f6c1859752.tar.gz
Common-Interface-Project-42e5bf91b0a851494650b31655c8f1f6c1859752.tar.bz2
Common-Interface-Project-42e5bf91b0a851494650b31655c8f1f6c1859752.zip
fix some code issues
-rw-r--r--README.md6
-rw-r--r--blocks/eda-frontend/src/components/SchematicEditor/Helper/SchematicEditor.css4
-rw-r--r--blocks/eda-frontend/src/components/Shared/Graph.js4
-rw-r--r--blocks/simulationAPI/helpers/ngspice_helper.py6
4 files changed, 12 insertions, 8 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..2e14961b
--- /dev/null
+++ b/README.md
@@ -0,0 +1,6 @@
+<h1 align="center">
+ Common Interface Project
+</h1>
+<h6 align="center">
+ [![CodeFactor](https://www.codefactor.io/repository/github/FOSSEE/Common-Interface-Project/badge)](https://www.codefactor.io/repository/github/FOSSEE/Common-Interface-Project)
+</h6>
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)