Skip to content

Commit 20fe904

Browse files
committed
Format with 2026 black style
1 parent 957f4d8 commit 20fe904

File tree

5 files changed

+16
-13
lines changed

5 files changed

+16
-13
lines changed

edam_ontology/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""EDAM data packaged as a Python module."""
22

33
# EDAMmajorversion.EDMAminorversion.pythonprojectdotversion
4-
__version__ = '1.25.3'
4+
__version__ = "1.25.3"

edam_ontology/streams.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
Keep parsing and such to minimum to maintain maximum backward compatibility.
44
"""
5+
56
import importlib.resources
67
from typing import IO
78

scripts/new_version.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import sys
77
from distutils.version import StrictVersion
88

9-
109
PROJECT_DIRECTORY = os.path.join(os.path.dirname(__file__), "..")
1110

1211

@@ -35,25 +34,25 @@ def extend(from_str, line):
3534
from_str += "\n"
3635
return history.replace(from_str, from_str + line + "\n")
3736

38-
history = extend(".. to_doc", """
37+
history = extend(
38+
".. to_doc",
39+
"""
3940
---------------------
4041
%s.dev0
4142
---------------------
4243
43-
""" % new_version)
44+
""" % new_version,
45+
)
4446
with open(history_path, "w") as fh:
4547
fh.write(history)
4648

4749
source_mod_path = os.path.join(PROJECT_DIRECTORY, source_dir, "__init__.py")
4850
with open(source_mod_path) as fh:
4951
mod = fh.read()
50-
mod = re.sub(r"__version__ = '[\d\.]+'",
51-
"__version__ = '%s.dev0'" % new_version,
52-
mod, 1)
52+
mod = re.sub(r"__version__ = '[\d\.]+'", "__version__ = '%s.dev0'" % new_version, mod, 1)
5353
with open(source_mod_path, "w") as fh:
5454
mod = fh.write(mod)
55-
shell(["git", "commit", "-m", "Starting work on %s" % new_version,
56-
"HISTORY.rst", "%s/__init__.py" % source_dir])
55+
shell(["git", "commit", "-m", "Starting work on %s" % new_version, "HISTORY.rst", "%s/__init__.py" % source_dir])
5756

5857

5958
def shell(cmds, **kwds):

tests/test_load.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Test file loading of eda_data.streams package."""
2+
23
from edam_ontology.streams import tabular_stream
34

45

@@ -7,8 +8,8 @@ def test_tabular_stream():
78
term_count = 0
89
with tabular_stream() as handle:
910
for line in handle.readlines():
10-
fields = line.split('\t')
11-
if not fields[0].startswith('http://edamontology.org/'):
11+
fields = line.split("\t")
12+
if not fields[0].startswith("http://edamontology.org/"):
1213
continue
1314
term_count += 1
1415

tox.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,23 @@ test_dir = tests
66
[testenv]
77
commands =
88
lint: flake8 {[tox]source_dir} {[tox]test_dir}
9-
unit: pytest {env:PYTEST_FAIL_FAIL:} {env:PYTEST_CAPTURE:} -m {env:PYTEST_MARK:""} {env:PYTEST_TARGET:{[tox]test_dir}} {posargs}
9+
lint: black --check --diff .
1010
mypy: mypy --install-types --non-interactive {[tox]source_dir} {[tox]test_dir} {posargs}
11+
unit: pytest {env:PYTEST_FAIL_FAIL:} {env:PYTEST_CAPTURE:} -m {env:PYTEST_MARK:""} {env:PYTEST_TARGET:{[tox]test_dir}} {posargs}
1112

1213
passenv =
1314
HOME
1415
DOCS
1516
GIT_*
1617

1718
deps =
19+
lint: black
1820
lint: flake8-import-order
1921
lint: flake8-docstrings
2022
lint: flake8
23+
mypy: mypy
2124
unit: -rdev-requirements.txt
2225
unit: pytest
23-
mypy: mypy
2426

2527
skip_install =
2628
lint,mypy: True

0 commit comments

Comments
 (0)