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

Add luhn exercise #40

Merged
merged 1 commit into from
Jan 30, 2024
Merged

Add luhn exercise #40

merged 1 commit into from
Jan 30, 2024

Conversation

pfertyk
Copy link
Contributor

@pfertyk pfertyk commented Jan 23, 2024

No description provided.

@pfertyk pfertyk force-pushed the add-luhn-exercise branch 4 times, most recently from 43a3713 to 5f75300 Compare January 23, 2024 17:54
@@ -0,0 +1,17 @@
{
"authors": [],
Copy link
Member

Choose a reason for hiding this comment

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

Needs your GitHub handle here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, added! :)

func test_is_valid_can_be_called_repeatedly(solution_script):
solution_script.card_num = "055 444 285"
return [solution_script.valid(), true]
return [solution_script.valid(), true]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return [solution_script.valid(), true]

Extra return line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is actually intentional, the rationale is given in the corresponding Python test file. I copied the comment from there, to make it clear ;)

@pfertyk pfertyk force-pushed the add-luhn-exercise branch 4 times, most recently from 3c92a81 to 1fd32df Compare January 23, 2024 20:31
@pfertyk pfertyk marked this pull request as ready for review January 23, 2024 20:32
@pfertyk
Copy link
Contributor Author

pfertyk commented Jan 23, 2024

@BNAndras in this PR I'm also making a small change in the flatten-array file, I didn't notice before that it uses spaces instead of tabs. I hope you don't mind ;)

@BNAndras
Copy link
Member

@BNAndras in this PR I'm also making a small change in the flatten-array file, I didn't notice before that it uses spaces instead of tabs. I hope you don't mind ;)

I’d probably make it a separate PR for consistency, but leaving the unrelated change in is fine for now.

@pfertyk pfertyk merged commit 57d6b33 into main Jan 30, 2024
2 checks passed
@pfertyk pfertyk deleted the add-luhn-exercise branch January 30, 2024 16: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