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

feat: snake_casing. empty input check. use list comprehension. handle… #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

TheNewThinkTank
Copy link

Changes made:

  • Improved variable names for better readability (listOfDicts changed to list_of_dicts, markdowntable changed to markdown_table, etc.).

  • Added a check for an empty input list to handle edge cases.

  • Used list comprehension for generating rows in the Markdown table for improved readability.

  • Used the .get() method to handle missing keys gracefully by providing a default value (an empty string in this case).

  • Combined the final result using "".join() instead of repeatedly concatenating strings, which is more efficient.

  • Added three unit tests using Pytest.

This updated version of the code has the same functionality as original.

… missing keys. use join to avoid multiple string concatenations. add 3 unit tests
@TheNewThinkTank
Copy link
Author

@codazoda

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.

1 participant