Skip to content

Commit be2fb95

Browse files
authored
Merge pull request #891 from blankirigaya/refactor/veff-use-fstrings-clean
replacing old '%' with newer f-string
2 parents aba27a3 + 49c86d5 commit be2fb95

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

malariagen_data/veff.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def get_ref_allele_coords(self, chrom, pos, ref):
8484
ref_seq = self.get_ref_seq(chrom, ref_start, ref_stop).lower()
8585
assert ref_seq == ref.lower(), (
8686
"reference allele does not match reference sequence, "
87-
"expected %r, found %r" % (ref_seq, ref.lower())
87+
f"expected {ref_seq!r}, found {ref.lower()!r}"
8888
)
8989

9090
return ref_start, ref_stop
@@ -262,11 +262,11 @@ def _get_within_cds_effect(ann, base_effect, cds, cdss):
262262
base_effect = base_effect._replace(
263263
ref_codon=ref_codon,
264264
alt_codon=alt_codon,
265-
codon_change="%s/%s" % (ref_codon, alt_codon),
265+
codon_change=f"{ref_codon}/{alt_codon}",
266266
aa_pos=aa_pos,
267267
ref_aa=ref_aa,
268268
alt_aa=alt_aa,
269-
aa_change="%s%s%s" % (ref_aa, aa_pos, alt_aa),
269+
aa_change=f"{ref_aa}{aa_pos}{alt_aa}",
270270
)
271271

272272
if len(ref) == 1 and len(alt) == 1:

0 commit comments

Comments
 (0)