[med-svn] [Git][med-team/mindthegap][master] Convert remaining Python2 script
Andreas Tille
gitlab at salsa.debian.org
Wed Jul 10 06:56:23 BST 2019
Andreas Tille pushed to branch master at Debian Med / mindthegap
Commits:
bfc8320b by Andreas Tille at 2019-07-10T05:56:12Z
Convert remaining Python2 script
- - - - -
1 changed file:
- debian/patches/2to3.patch
Changes:
=====================================
debian/patches/2to3.patch
=====================================
@@ -179,3 +179,41 @@ Description: Automatic port to Python3 via
del_pos = 0
while seq_del_cpt < (len(comment2seq[comment]) / nuc_per_del):
+--- a/test/vde.py
++++ b/test/vde.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+
+ # -*- coding: utf-8 -*-
+
+@@ -40,7 +40,7 @@ class Variant(object):
+ def main():
+ """ The main function of vde no argument """
+
+- enable_input = [name.split("2")[0] for name in globals().keys()
++ enable_input = [name.split("2")[0] for name in list(globals().keys())
+ if name.endswith("2eva")]
+
+ parser = argparse.ArgumentParser(
+@@ -89,17 +89,17 @@ def result_printing(result, count):
+
+ head = ",".join(("type", "TP", "FP", "recall", "precision"))
+ print(head)
+- for gap in result.keys():
++ for gap in list(result.keys()):
+ total = result[gap]["TP"] + result[gap]["FP"]
+
+ prec = 1 if total == 0 else result[gap]["TP"]/float(total)
+ recall = 1 if count[gap] == 0 else result[gap]["TP"]/float(count[gap])
+
+- print(",".join((str(gap),
++ print((",".join((str(gap),
+ str(result[gap]["TP"]),
+ str(result[gap]["FP"]),
+ str(recall),
+- str(prec))))
++ str(prec)))))
+
+
+ def compare(exp, truth, delta):
View it on GitLab: https://salsa.debian.org/med-team/mindthegap/commit/bfc8320bb0306850eb39f5ef8bf4162aa119f1a3
--
View it on GitLab: https://salsa.debian.org/med-team/mindthegap/commit/bfc8320bb0306850eb39f5ef8bf4162aa119f1a3
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190710/f9427a38/attachment-0001.html>
More information about the debian-med-commit
mailing list