Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#287)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Steven Silvester <steven.silvester@ieee.org>
  • Loading branch information
pre-commit-ci[bot] and blink1073 committed Apr 3, 2023
1 parent f00964c commit 7b44a1c
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.21.0
rev: 0.22.0
hooks:
- id: check-github-workflows

Expand All @@ -31,12 +31,12 @@ repos:
[mdformat-gfm, mdformat-frontmatter, mdformat-footnote]

- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.3.0
hooks:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.254
rev: v0.0.260
hooks:
- id: ruff
args: ["--fix"]
2 changes: 1 addition & 1 deletion example/roundtrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
out, oclass = octave.roundtrip(x, nout=2)
import pprint

pprint.pprint([x, x.dtype, out, oclass, out.dtype])
pprint.pprint([x, x.dtype, out, oclass, out.dtype]) # noqa
2 changes: 1 addition & 1 deletion example/test_datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
out = octave.test_datatypes()
import pprint

pprint.pprint(out)
pprint.pprint(out) # noqa
2 changes: 1 addition & 1 deletion oct2py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
try:
octave = Oct2Py()
except Oct2PyError as e:
print(e)
print(e) # noqa


def kill_octave():
Expand Down
2 changes: 1 addition & 1 deletion oct2py/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ def _print_doc(self, name):
out : None
"""
print(self._get_doc(name))
print(self._get_doc(name)) # noqa

def _get_doc(self, name):
"""
Expand Down
2 changes: 1 addition & 1 deletion oct2py/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def demo(delay=1, interactive=True):
line = line.strip() # noqa
if "input(" not in line:
time.sleep(delay)
print(f">>> {line}")
print(f">>> {line}") # noqa
time.sleep(delay)
if not interactive and ("plot" in line or "surf" in line or "input(" in line):
line = "print()" # noqa
Expand Down
4 changes: 2 additions & 2 deletions oct2py/tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def test_multiline_statement(self):

def test_empty_values(self):
self.oc.push("a", "")
assert self.oc.pull("a") == ""
assert not self.oc.pull("a")

self.oc.push("a", [])
assert self.oc.pull("a") == []
Expand Down Expand Up @@ -289,7 +289,7 @@ def test_deprecated_return_both(self):
text, value = self.oc.eval(
['disp("hi")', "ones(3);"], return_both=True, stream_handler=lines.append
)
assert text == ""
assert not text
assert np.allclose(value, np.ones((3, 3)))
assert lines[0].strip() == "hi"

Expand Down
2 changes: 1 addition & 1 deletion oct2py/tests/test_roundtrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def test_octave_origin(self):
assert self.oc.pull("x") is not None
self.oc.push("y", self.data)
try:
self.oc.isequaln
self.oc.isequaln # noqa
func = "isequaln"
except Oct2PyError:
func = "isequalwithequalnans"
Expand Down
2 changes: 1 addition & 1 deletion oct2py/tests/test_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def test_struct(self):
test["foo"]["bar"] = 10
assert test.foo.bar == 10
p = pickle.dumps(test)
test2 = pickle.loads(p)
test2 = pickle.loads(p) # noqa
assert test2["spam"] == "eggs"
assert test2["eggs"]["spam"] == "eggs"
assert test2.foo.bar == 10
Expand Down
1 change: 0 additions & 1 deletion oct2py/thread_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def run(self):
if self.name != name:
msg = "Thread collision detected"
raise Oct2PyError(msg)
return


def thread_check(nthreads=3):
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ test = "mypy --install-types --non-interactive {args:oct2py}"

[tool.hatch.envs.lint]
dependencies = [
"black[jupyter]==23.1.0",
"black[jupyter]==23.3.0",
"mdformat>0.7",
"mdformat-gfm>=0.3.5",
"ruff==0.0.254"
"ruff==0.0.260"
]
detached = true
[tool.hatch.envs.lint.scripts]
Expand Down

0 comments on commit 7b44a1c

Please sign in to comment.