Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use of len(seq) - 1 to get last item of an iterable #1500

Merged
merged 1 commit into from
Jun 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Autocoders/Python/test/dictgen/test_dictgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ def compare_serials_ai_gds(topology_serials, gds_serials):
for gds_serial in gds_serials:
# For scope of test, only verify serial type and member names/types
type = gds_serial.attrib["type"].split("::")
type = type[len(type) - 1]
type = type[-1]
types.append(type)
if not type in member_names.keys():
member_names[type] = []
Expand Down Expand Up @@ -675,7 +675,7 @@ def compare_enums_ai_gds(topology_enums, gds_enums):
for gds_enum in gds_enums:
# For scope of test, only verify enum name and item names
name = gds_enum.attrib["type"].split("::")
name = name[len(name) - 1]
name = name[-1]
names.append(name)
if not name in items.keys():
items[name] = []
Expand Down