Skip to content

refactor!: Make local_variables a dictionary instead of a list of strings#79

Merged
dexter2206 merged 9 commits intomainfrom
71-change-local-variables-to-dict
Jul 12, 2024
Merged

refactor!: Make local_variables a dictionary instead of a list of strings#79
dexter2206 merged 9 commits intomainfrom
71-change-local-variables-to-dict

Conversation

@dexter2206
Copy link
Contributor

@dexter2206 dexter2206 commented Jul 3, 2024

Description

Currently, we store local variables as a list of strings, each of them of the form "symbol = expression", e.g.:

local_variables = ["a = x + y", "b = 42"]

However, each time such variables are processed, this lists of strings gets converted to a dictionary. Therefore, it is only natural to make local_variables a dictionary in the first place, so that the example above looks like:

local_variables = {"a": "x+y", "b": "42"}

which is what this PR does.

While refactoring this, some functions became obsolete and were thus removed from the codebase entirely as a part of this PR.

Please verify that you have completed the following steps

  • I have self-reviewed my code.
  • I have included test cases validating introduced feature/fix.
  • I have updated documentation.

@cla-bot cla-bot bot added the cla-signed label Jul 3, 2024
@dexter2206 dexter2206 force-pushed the 71-change-local-variables-to-dict branch from 03c0d03 to a2ffd95 Compare July 12, 2024 11:08
@cla-bot
Copy link

cla-bot bot commented Jul 12, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Konrad Jałowiecki.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@cla-bot cla-bot bot removed the cla-signed label Jul 12, 2024
@cla-bot
Copy link

cla-bot bot commented Jul 12, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Konrad Jałowiecki.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@dexter2206 dexter2206 force-pushed the 71-change-local-variables-to-dict branch from 6af5af7 to b06f09b Compare July 12, 2024 14:33
@cla-bot cla-bot bot added the cla-signed label Jul 12, 2024
@dexter2206 dexter2206 merged commit 2837c2c into main Jul 12, 2024
@dexter2206 dexter2206 deleted the 71-change-local-variables-to-dict branch July 12, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant