[LyX/master] Remove more unused variables.

Richard Kimberly Heck rikiheck at lyx.org
Thu Dec 8 19:23:28 UTC 2022


commit b0fa3efd5794837827becfe4f356f80880a937ee
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date:   Thu Dec 8 15:17:57 2022 -0500

    Remove more unused variables.
    
    These flags are only relevant to reference-types that we are not
    reverting. That's why they were unused.
---
 lib/lyx2lyx/lyx_2_4.py |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py
index 0b29bdc..2d6e15d 100644
--- a/lib/lyx2lyx/lyx_2_4.py
+++ b/lib/lyx2lyx/lyx_2_4.py
@@ -4545,7 +4545,7 @@ def revert_starred_refs(document):
     i = 0
     in_inset = False
     cmd = ref = ""
-    plural = caps = noprefix = nolink = False
+    nolink = False
     nolinkline = -1
     while True:
         if not in_inset:
@@ -4575,7 +4575,7 @@ def revert_starred_refs(document):
         if i == end:
             in_inset = False
             # If nolink is False, just remove that line
-            if nolink == False or cmd == "formatted":
+            if nolink == False or cmd == "formatted" or cmd == "labelonly":
                 # document.warning("Skipping " + cmd + " " + ref)
                 if nolinkline != -1:
                     del document.body[nolinkline]
@@ -4588,7 +4588,7 @@ def revert_starred_refs(document):
             i += len(newlines) - (end - start) + 1
             # reset variables
             cmd = ref = ""
-            plural = caps = noprefix = nolink = False
+            nolink = False
             nolinkline = -1
             continue
         l = document.body[i]
@@ -4596,15 +4596,6 @@ def revert_starred_refs(document):
             cmd = l[13:]
         elif l.startswith("reference"):
             ref = l[11:-1]
-        elif l.startswith("caps"):
-            tmp = l[6:-1]
-            caps = (tmp == "true")
-        elif l.startswith("plural"):
-            tmp = l[8:-1]
-            plural = (tmp == "true")
-        elif l.startswith("noprefix"):
-            tmp = l[10:-1]
-            noprefix = (tmp == "true")
         elif l.startswith("nolink"):
             tmp = l[8:-1]
             nolink  = (tmp == "true")


More information about the lyx-cvs mailing list