-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
Improve readability of ciphers/mixed_keyword_cypher.py #8626
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
518f4e5
refactored the code
yanvoi 16c9268
the code will now pass the test
yanvoi a6d64ff
looked more into it and fixed the logic
yanvoi 642ccc3
made the code easier to read, added comments and fixed the logic
yanvoi 3520c16
got rid of redundant code + plaintext can contain chars that are not …
yanvoi 3a099f5
fixed the reduntant conversion of ascii_uppercase to a list
yanvoi 738f193
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b284ab1
keyword and plaintext won't have default values
yanvoi ad436ce
ran the ruff command
yanvoi dbbd778
Merge branch 'master' into issue8622fix
yanvoi be6f043
Update linear_discriminant_analysis.py and rsa_cipher.py (#8680)
rohan472000 33b34c4
fixed some difficulties
yanvoi 66e28ee
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 35d3de2
Merge branch 'master' into issue8622fix
yanvoi 0bf2ed2
added comments, made printing mapping optional, added 1 test
yanvoi 05d0283
shortened the line that was too long
yanvoi ad8c99f
Update ciphers/mixed_keyword_cypher.py
yanvoi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally the algorithm shouldn't have side effects such as printing, but I understand that printing the mapping is helpful for debugging purposes. Perhaps it'd be better to have a "verbose" function parameter that allows users to enable/disable printing the mapping
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done - I've also added a test case that includes setting the verbose parameter to False