Skip to content

Commit 4e54dda

Browse files
committed
linting
1 parent ec93ff4 commit 4e54dda

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

python/src/bioscript/cli.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ def test_command(args):
7777
print(f"Error: Classifier script not found: {script_path}", file=sys.stderr)
7878
sys.exit(1)
7979

80-
print(f"\n{'='*60}")
80+
print(f"\n{'=' * 60}")
8181
print(f"Testing: {script_path}")
82-
print('='*60)
82+
print("=" * 60)
8383

8484
result = run_tests(script_path, verbose=True)
8585

@@ -110,7 +110,7 @@ def export_command(args):
110110

111111
# Run tests if requested
112112
if args.test and not args.no_tests:
113-
print(f"\nRunning tests in exported file...")
113+
print("\nRunning tests in exported file...")
114114
test_result = run_tests(result, verbose=True)
115115
if not test_result["success"]:
116116
sys.exit(1)
@@ -258,25 +258,22 @@ def main():
258258
subparsers = parser.add_subparsers(dest="command", required=True)
259259

260260
# Test command
261-
test_parser = subparsers.add_parser(
262-
"test", help="Run tests in classifier modules"
263-
)
261+
test_parser = subparsers.add_parser("test", help="Run tests in classifier modules")
264262
test_parser.add_argument(
265263
"classifiers",
266264
nargs="+",
267265
help="Paths to classifier scripts with test_* functions",
268266
)
269267

270268
# Export command
271-
export_parser = subparsers.add_parser(
272-
"export", help="Export classifier from Jupyter notebook"
273-
)
269+
export_parser = subparsers.add_parser("export", help="Export classifier from Jupyter notebook")
274270
export_parser.add_argument(
275271
"notebook",
276272
help="Path to Jupyter notebook (.ipynb)",
277273
)
278274
export_parser.add_argument(
279-
"-o", "--output",
275+
"-o",
276+
"--output",
280277
help="Output path for Python file (default: same name as notebook)",
281278
)
282279
export_parser.add_argument(

python/src/bioscript/testing.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from pathlib import Path
99
from typing import Any, Callable, Iterator
1010

11-
from .data import GenotypeGenerator, create_test_variants
11+
from .data import GenotypeGenerator
1212
from .types import GRCh, VariantRow
1313

1414

@@ -240,10 +240,7 @@ def export_from_notebook(
240240
if not notebook_path.exists():
241241
raise FileNotFoundError(f"Notebook not found: {notebook_path}")
242242

243-
if output_path is None:
244-
output_path = notebook_path.with_suffix(".py")
245-
else:
246-
output_path = Path(output_path)
243+
output_path = notebook_path.with_suffix(".py") if output_path is None else Path(output_path)
247244

248245
# Load notebook
249246
with open(notebook_path) as f:

0 commit comments

Comments
 (0)