Code cleanup: This condition won't ever be run #3

Open
opened 2024-07-29 09:29:41 +00:00 by kenkeiras · 0 comments
Owner

org_rw/org_rw.py Lines 1571 to 1583 in a56ac018a8
if close != -1 and contents[close + 1] == "[":
# Link with description?
close = contents.find("]", close + 1)
if close != -1 and contents[close + 1] == "]":
# No match here means this is not an Org link
cut_string()
in_link = True
tokens.append((TOKEN_TYPE_OPEN_LINK, None))
assert "[" == (next(cursor)[1])
last_link_start = i
continue

This is more restrictive than the previous condition and that one finishes with a continue, so this branch won't ever be reached.

https://code.codigoparallevar.com/kenkeiras/org-rw/src/commit/a56ac018a87347c7e2bce8a77a39374670b27530/org_rw/org_rw.py#L1571-L1583 This is more restrictive than the previous condition and that one finishes with a `continue`, so this branch won't ever be reached.
kenkeiras added the
cleanup
label 2024-07-30 09:08:57 +00:00
kenkeiras added reference develop 2024-07-30 09:09:03 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kenkeiras/org-rw#3
No description provided.