From 6162d01fd8316428ef70828b4415ac3126d3df96 Mon Sep 17 00:00:00 2001
From: "Silas S. Brown" <ssb22@cam.ac.uk>
Date: Sat, 2 Nov 2019 08:03:39 +0000
Subject: [PATCH] Update README.md, Annotator Generator

---
 README.md  | 2 +-
 annogen.py | 8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 670800a..a948c95 100644
--- a/README.md
+++ b/README.md
@@ -846,7 +846,7 @@ Options:
  : File to use as a template for Android start HTML.  This option implies --android=file:///android_asset/index.html and generates that index.html from the file specified (or from nothing if the special filename 'blank' is used).  The template file may include URL_BOX_GOES_HERE to show a URL entry box and related items (offline-clipboard link etc) in the page. This version also enables better zoom controls on Android 4+ and a visible version stamp (which, if the device is in 'developer mode', you may double-tap on to show missing glosses).
 
 `--android-pre-2016`
- : [**Deprecated**] When generating an Android app, assume the build environment is older than the mid-2016 release (SDK 24).  New apps compiled in this way are no longer allowed on "Play Store" (and updates won't be allowed from November 2019) unless you also set --android-https-only, since the extra configuration for non-HTTPS in Play Store's newly-required Target API needs at least version 24 of the SDK to compile.  This option is deprecated because you should be able to install a newer SDK on a virtual machine if your main OS cannot be upgraded (e.g. on a 2011 Mac stuck on MacOS 10.7, I used VirtualBox 4.3.4, Vagrant 1.9.5, Debian 8 Jessie and SSH with X11 forwarding to install Android Studio 3.5 from 2019).
+ : [**Deprecated**] When generating an Android app, assume the build environment is older than the mid-2016 release (SDK 24).  Apps compiled in this way are no longer allowed on "Play Store" unless you also set --android-https-only, since the extra configuration for non-HTTPS in Play Store's newly-required Target API needs at least version 24 of the SDK to compile.  This option is deprecated because you should be able to install a newer SDK on a virtual machine if your main OS cannot be upgraded (e.g. on a 2011 Mac stuck on MacOS 10.7, I used VirtualBox 4.3.4, Vagrant 1.9.5, Debian 8 Jessie and SSH with X11 forwarding to install Android Studio 3.5 from 2019).
 
 `--no-android-pre-2016
 `
diff --git a/annogen.py b/annogen.py
index 0f2c41a..7b33a91 100644
--- a/annogen.py
+++ b/annogen.py
@@ -224,7 +224,7 @@ parser.add_option("--android-template",
                   help="File to use as a template for Android start HTML.  This option implies --android=file:///android_asset/index.html and generates that index.html from the file specified (or from nothing if the special filename 'blank' is used).  The template file may include URL_BOX_GOES_HERE to show a URL entry box and related items (offline-clipboard link etc) in the page. This version also enables better zoom controls on Android 4+ and a visible version stamp (which, if the device is in 'developer mode', you may double-tap on to show missing glosses).")
 parser.add_option("--android-pre-2016",
                   action="store_true",default=False,
-                  help="[DEPRECATED] When generating an Android app, assume the build environment is older than the mid-2016 release (SDK 24).  New apps compiled in this way are no longer allowed on \"Play Store\" (and updates won't be allowed from November 2019) unless you also set --android-https-only, since the extra configuration for non-HTTPS in Play Store's newly-required Target API needs at least version 24 of the SDK to compile.  This option is deprecated because you should be able to install a newer SDK on a virtual machine if your main OS cannot be upgraded (e.g. on a 2011 Mac stuck on MacOS 10.7, I used VirtualBox 4.3.4, Vagrant 1.9.5, Debian 8 Jessie and SSH with X11 forwarding to install Android Studio 3.5 from 2019).")
+                  help="[DEPRECATED] When generating an Android app, assume the build environment is older than the mid-2016 release (SDK 24).  Apps compiled in this way are no longer allowed on \"Play Store\" unless you also set --android-https-only, since the extra configuration for non-HTTPS in Play Store's newly-required Target API needs at least version 24 of the SDK to compile.  This option is deprecated because you should be able to install a newer SDK on a virtual machine if your main OS cannot be upgraded (e.g. on a 2011 Mac stuck on MacOS 10.7, I used VirtualBox 4.3.4, Vagrant 1.9.5, Debian 8 Jessie and SSH with X11 forwarding to install Android Studio 3.5 from 2019).")
 cancelOpt("android-pre-2016")
 parser.add_option("--android-https-only",
                   action="store_true",default=False,
@@ -4049,10 +4049,8 @@ def PairPriorities(markedDown_Phrases,existingFreqs={}):
           closure.update(candidate)
         for x,y in candidate:
             # x>y y<x, so y should be in lessThan[x]
-            if not x in lessThan: lessThan[x] = set()
-            lessThan[x].add(y)
-            if not y in gtThan: gtThan[y] = set()
-            gtThan[y].add(x)
+            lessThan.setdefault(x,set()).add(y)
+            gtThan.setdefault(y,set()).add(x)
         return True
     for _,v,a,b in reversed(sorted([(abs(v),v,a,b) for (a,b),v in votes.items()])):
         if v < 0: a,b = b,a
-- 
GitLab