Skip to content

Commit 3a78bb0

Browse files
committed
Merge branch 'development' into feat-use-jnml-from-pyneuroml
2 parents 3f7c1c8 + f13cfbb commit 3a78bb0

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

.mypy.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[mypy]
2+
ignore_missing_imports = True

.pre-commit-config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.4.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: check-added-large-files
10+
args: [ "--maxkb=5000"]
11+
- repo: https://github.com/astral-sh/ruff-pre-commit
12+
rev: v0.4.1
13+
hooks:
14+
- id: ruff
15+
args: [ "--select", "I", "--fix" ]
16+
- id: ruff-format

omv/common/inout.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -120,29 +120,18 @@ def check_output(cmds, cwd=".", shell=False, verbosity=0, env=None):
120120
return ret_string
121121

122122
except sp.CalledProcessError as err:
123-
inform(
124-
"CalledProcessError running commands: %s in %s (return code: %s), output:\n%s"
125-
% (cmds, cwd, err.returncode, err.output),
126-
indent=2,
127-
verbosity=verbosity,
128-
)
129123
inform("Error: %s" % (err), indent=2, verbosity=verbosity)
130124
raise err
131125
except Exception as err:
132-
inform(
133-
"Error running commands: %s in (%s)!" % (cmds, cwd),
134-
indent=2,
135-
verbosity=verbosity,
136-
)
137126
inform("Error: %s" % (err), indent=2, verbosity=verbosity)
138127
raise err
139128

140129

141130
def pip_install(packages, version=None):
142131
pip = "pip3" if sys.version_info.major == 3 else "pip"
143132
cmds = [pip, "install"]
144-
if type(packages) == str:
145-
if version == None:
133+
if isinstance(packages, str):
134+
if version is None:
146135
cmds.append(packages)
147136
else:
148137
cmds.append("%s==%s" % (packages, version))

0 commit comments

Comments
 (0)