Skip to content

Commit c0e4d17

Browse files
committed
chore: wip
1 parent 4523b90 commit c0e4d17

30 files changed

Lines changed: 48 additions & 89 deletions

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,15 @@ check = [
7575
"ruff check src tests",
7676
]
7777
format = [
78-
"black --preview src tests",
78+
"black src tests",
7979
"ruff check --fix --unsafe-fixes src tests",
8080
"check",
8181
]
8282
typecheck = [
83-
"pyright src tests",
83+
"""
84+
pyright --pythonpath="$(uv run --active hatch run quality:python -c 'import sys; print(sys.executable)')" \
85+
{args:src/ tests/}
86+
"""
8487
]
8588

8689
[tool.pyright]

requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/vcfpy/exceptions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
"""Exceptions for the vcfpy module
3-
"""
2+
"""Exceptions for the vcfpy module"""
43

54
__author__ = "Manuel Holtgrewe <manuel.holtgrewe@bihealth.de>"
65

src/vcfpy/parser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
"""Parsing of VCF files from ``str``
3-
"""
2+
"""Parsing of VCF files from ``str``"""
43

54
import ast
65
import functools

src/vcfpy/reader.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
"""Parsing of VCF files from ``file``-like objects
3-
"""
2+
"""Parsing of VCF files from ``file``-like objects"""
43

54
import gzip
65
import os

tests/test_call.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
"""Test Call class
3-
"""
2+
"""Test Call class"""
43

54
import vcfpy
65
from vcfpy import record

tests/test_context_manager.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
"""Tests for the Reader and Writer working as context managers
3-
"""
2+
"""Tests for the Reader and Writer working as context managers"""
43

54
import io
65
import os

tests/test_fetch.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
"""Test fetching within tabix files
3-
"""
2+
"""Test fetching within tabix files"""
43

54
import os
65

tests/test_header.py

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
"""Tests for vcfpy.header
3-
"""
2+
"""Tests for vcfpy.header"""
43

54
import sys
65

@@ -103,13 +102,11 @@ def test_header_alt_allele_header_line():
103102
)
104103
else:
105104
assert (
106-
str(line1)
107-
== "AltAlleleHeaderLine('ALT', '<ID=DEL,Description=\"deletion\">', "
105+
str(line1) == "AltAlleleHeaderLine('ALT', '<ID=DEL,Description=\"deletion\">', "
108106
"{'ID': 'DEL', 'Description': 'deletion'})"
109107
)
110108
assert (
111-
repr(line1)
112-
== "AltAlleleHeaderLine('ALT', '<ID=DEL,Description=\"deletion\">', "
109+
repr(line1) == "AltAlleleHeaderLine('ALT', '<ID=DEL,Description=\"deletion\">', "
113110
"{'ID': 'DEL', 'Description': 'deletion'})"
114111
)
115112
assert line1.value == '<ID=DEL,Description="deletion">'
@@ -149,24 +146,20 @@ def test_header_filter_header_line():
149146
assert line1 != line3
150147
if sys.version_info < (3, 6):
151148
assert (
152-
str(line1)
153-
== "FilterHeaderLine('FILTER', '<ID=PASS,Description=\"All filters passed\">', "
149+
str(line1) == "FilterHeaderLine('FILTER', '<ID=PASS,Description=\"All filters passed\">', "
154150
"OrderedDict([('ID', 'PASS'), ('Description', 'All filters passed')]))"
155151
)
156152
assert (
157-
repr(line1)
158-
== "FilterHeaderLine('FILTER', '<ID=PASS,Description=\"All filters passed\">', "
153+
repr(line1) == "FilterHeaderLine('FILTER', '<ID=PASS,Description=\"All filters passed\">', "
159154
"OrderedDict([('ID', 'PASS'), ('Description', 'All filters passed')]))"
160155
)
161156
else:
162157
assert (
163-
str(line1)
164-
== "FilterHeaderLine('FILTER', '<ID=PASS,Description=\"All filters passed\">', "
158+
str(line1) == "FilterHeaderLine('FILTER', '<ID=PASS,Description=\"All filters passed\">', "
165159
"{'ID': 'PASS', 'Description': 'All filters passed'})"
166160
)
167161
assert (
168-
repr(line1)
169-
== "FilterHeaderLine('FILTER', '<ID=PASS,Description=\"All filters passed\">', "
162+
repr(line1) == "FilterHeaderLine('FILTER', '<ID=PASS,Description=\"All filters passed\">', "
170163
"{'ID': 'PASS', 'Description': 'All filters passed'})"
171164
)
172165
assert line1.value == '<ID=PASS,Description="All filters passed">'
@@ -183,13 +176,11 @@ def test_header_pedigree_header_line():
183176
assert line1 != line3
184177
if sys.version_info < (3, 6):
185178
assert (
186-
str(line1)
187-
== "PedigreeHeaderLine('PEDIGREE', '<ID=child,Father=father>', "
179+
str(line1) == "PedigreeHeaderLine('PEDIGREE', '<ID=child,Father=father>', "
188180
"OrderedDict([('ID', 'child'), ('Father', 'father')]))"
189181
)
190182
assert (
191-
repr(line1)
192-
== "PedigreeHeaderLine('PEDIGREE', '<ID=child,Father=father>', "
183+
repr(line1) == "PedigreeHeaderLine('PEDIGREE', '<ID=child,Father=father>', "
193184
"OrderedDict([('ID', 'child'), ('Father', 'father')]))"
194185
)
195186
else:
@@ -239,13 +230,11 @@ def test_header_info_header_line():
239230
assert line1 != line3
240231
if sys.version_info < (3, 6):
241232
assert (
242-
str(line1)
243-
== "InfoHeaderLine('INFO', '<ID=SVTYPE,Number=1,Type=String>', "
233+
str(line1) == "InfoHeaderLine('INFO', '<ID=SVTYPE,Number=1,Type=String>', "
244234
"OrderedDict([('ID', 'SVTYPE'), ('Number', 1), ('Type', 'String')]))"
245235
)
246236
assert (
247-
repr(line1)
248-
== "InfoHeaderLine('INFO', '<ID=SVTYPE,Number=1,Type=String>', "
237+
repr(line1) == "InfoHeaderLine('INFO', '<ID=SVTYPE,Number=1,Type=String>', "
249238
"OrderedDict([('ID', 'SVTYPE'), ('Number', 1), ('Type', 'String')]))"
250239
)
251240
else:
@@ -279,24 +268,20 @@ def test_header_format_header_line():
279268
assert line1 != line3
280269
if sys.version_info < (3, 6):
281270
assert (
282-
str(line1)
283-
== "FormatHeaderLine('FORMAT', '<ID=AD,Number=R,Type=Integer>', "
271+
str(line1) == "FormatHeaderLine('FORMAT', '<ID=AD,Number=R,Type=Integer>', "
284272
"OrderedDict([('ID', 'AD'), ('Number', 'R'), ('Type', 'Integer')]))"
285273
)
286274
assert (
287-
repr(line1)
288-
== "FormatHeaderLine('FORMAT', '<ID=AD,Number=R,Type=Integer>', "
275+
repr(line1) == "FormatHeaderLine('FORMAT', '<ID=AD,Number=R,Type=Integer>', "
289276
"OrderedDict([('ID', 'AD'), ('Number', 'R'), ('Type', 'Integer')]))"
290277
)
291278
else:
292279
assert (
293-
str(line1)
294-
== "FormatHeaderLine('FORMAT', '<ID=AD,Number=R,Type=Integer,Description=\"Allelic depths\">', "
280+
str(line1) == "FormatHeaderLine('FORMAT', '<ID=AD,Number=R,Type=Integer,Description=\"Allelic depths\">', "
295281
"{'ID': 'AD', 'Number': 'R', 'Type': 'Integer', 'Description': 'Allelic depths'})"
296282
)
297283
assert (
298-
repr(line1)
299-
== "FormatHeaderLine('FORMAT', '<ID=AD,Number=R,Type=Integer,Description=\"Allelic depths\">', "
284+
repr(line1) == "FormatHeaderLine('FORMAT', '<ID=AD,Number=R,Type=Integer,Description=\"Allelic depths\">', "
300285
"{'ID': 'AD', 'Number': 'R', 'Type': 'Integer', 'Description': 'Allelic depths'})"
301286
)
302287
assert line1.value == '<ID=AD,Number=R,Type=Integer,Description="Allelic depths">'

tests/test_header_add_lines.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
"""Test adding header lines to headers
3-
"""
2+
"""Test adding header lines to headers"""
43

54
import io
65

0 commit comments

Comments
 (0)