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 valid assignment uses from ask command errors #5740

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

boryanagoncharenko
Copy link
Collaborator

Fixes #3274
In levels 1-6 the ask and assign commands sometimes overlap and sometimes return an error incorrectly. With this PR, some correct usages are removed from the common error scenarios. Specifically:

  • in levels 2-3 assignments can have variable names starting with ask, e.g. asking is 5, ask_output is test
  • in levels 4-6 assignments can start with the word ask, e.g. var is asking you a question

However, the incorrect uses of ask should still return an error:

  • in levels 2-3 ask what is it? should return a wrong level exception
  • in levels 4-6 var is ask what is it? should return a missing quotes exception

How to test

# in level 2
ask missing var
# this should return an error

asks is Felienne
# this should defined a variable ‘asks’
# in level 3, language NL
vraaga is vind je honden aardig, doe jij teveel gamen, je ging op pad
print vraaga at random
# this should not yield an error
# in level 4 and 6
var is asking me a question?
print var
# this should not yield an error

Copy link
Member

@Felienne Felienne left a comment

Choose a reason for hiding this comment

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

Awesome, this was such a longstanding issue!

Copy link
Contributor

mergify bot commented Sep 4, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 7b456ab into main Sep 4, 2024
12 checks passed
@mergify mergify bot deleted the ask_error_3274 branch September 4, 2024 08:25
Copy link
Contributor

mergify bot commented Sep 4, 2024

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

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.

[BUG] Error when using vraag as a variable in level 3 (language Dutch, keywords English)
2 participants