Skip to content

Commit

Permalink
checking for 'const' early makes these code blocks dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
jpivarski committed Jan 17, 2025
1 parent 8bf8f88 commit fc0db19
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/uproot/interpretation/identify.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,19 +921,6 @@ def _parse_node(tokens, i, typename, file, quote, header, inner_header):
_parse_maybe_quote(f"uproot.containers.AsString({header})", quote),
)

elif (
has2
and tokens[i].group(0) == "const"
and (
tokens[i + 1].group(0) == "string"
or _simplify_token(tokens[i + 1]) == "std::string"
)
):
return (
i + 2,
_parse_maybe_quote(f"uproot.containers.AsString({header})", quote),
)

elif tokens[i].group(0) == "TString":
return (
i + 1,
Expand All @@ -949,18 +936,6 @@ def _parse_node(tokens, i, typename, file, quote, header, inner_header):
quote,
),
)
elif (
has2
and tokens[i].group(0) == "const"
and _simplify_token(tokens[i + 1]) == "char*"
):
return (
i + 2,
_parse_maybe_quote(
"uproot.containers.AsString(False, length_bytes='4', typename='char*')",
quote,
),
)

elif tokens[i].group(0) == "bitset" or _simplify_token(tokens[i]) == "std::bitset":
_parse_expect("<", tokens, i + 1, typename, file)
Expand Down

0 comments on commit fc0db19

Please sign in to comment.