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

simplify value conversion by removing ast.literal_eval #675

Closed

Conversation

AAYUSH2091
Copy link

SUMMARY

Simplifies the value handling logic in network common utils by removing the complex ast.literal_eval approach in favor of direct string conversion.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

network.common.utils

@AAYUSH2091 AAYUSH2091 closed this by deleting the head repository Oct 28, 2024
return ast.literal_eval(value)
except Exception:
return str(value)
if value is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

@AAYUSH2091 we generally put try and exception block to handle corner cases so i dont think removing this would be a good option here, so you might wanna revert it back if thats not something blocking you but we cant just refactor the code this way, this might open other potential problems/errors for us.

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