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

range replaced with enumerate #461

Merged

Conversation

GeneCodeSavvy
Copy link
Contributor

@GeneCodeSavvy GeneCodeSavvy commented Mar 2, 2025

#433 Simple fix replacing range(len(items)) with enumerate(items)

new_reference = identity_map[str_item].identity
for i, item in enumerate(items):
str_item = str(item)
if str(item) in identity_map:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if str(item) in identity_map:
if str_item in identity_map:

for i, item in enumerate(items):
str_item = str(item)
if str(item) in identity_map:
new_reference = identity_map[str(item)].identity
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
new_reference = identity_map[str(item)].identity
new_reference = identity_map[str_item].identity

@tcmitchell
Copy link
Collaborator

This looks great. I think this PR should also include deleting consider-using-enumerate from setup.cfg. Do you agree, @GeneCodeSavvy ?

@GeneCodeSavvy
Copy link
Contributor Author

Yeah great idea, slipped my mind.

Thank you

@GeneCodeSavvy
Copy link
Contributor Author

Done

@tcmitchell tcmitchell merged commit 2698810 into SynBioDex:main Mar 6, 2025
12 checks passed
@GeneCodeSavvy GeneCodeSavvy deleted the fix-pylint-consider-using-enumerate branch March 7, 2025 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants