Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDocstrings and formatting improvements #2418
Conversation
|
Build log says:
|
|
oh, yeah it was a doctest i need to find the print statement too and update it |
|
Thank you for your pull request! |
| @@ -131,7 +131,8 @@ def prime_implicant_chart(prime_implicants, binary): | |||
| >>> prime_implicant_chart(['0.00.01.5'],['0.00.01.5']) | |||
| [[1]] | |||
| """ | |||
| chart = [[0 for x in range(len(binary))] for x in range(len(prime_implicants))] | |||
| chart = [[0 for x in range(len(binary))] | |||
This comment has been minimized.
This comment has been minimized.
| # Define a new cell and add it to the new generation | ||
| situation = 7 - int(f"{left_neighbor}{cells[time][i]}{right_neighbor}", 2) | ||
| situation = 7 - int( |
This comment has been minimized.
This comment has been minimized.
| False | ||
| >>> maze = [[0, 1], | ||
| ... [1, 0]] | ||
| >>> solve_maze(maze) | ||
| Solution does not exists! | ||
| Solution does not exist! |
This comment has been minimized.
This comment has been minimized.
| @@ -63,16 +63,16 @@ def solve_maze(maze: list) -> bool: | |||
| if solved: | |||
| print("\n".join(str(row) for row in solutions)) | |||
| else: | |||
| print("Solution does not exists!") | |||
| print("Solution does not exist!") | |||
This comment has been minimized.
This comment has been minimized.
cclauss
Sep 13, 2020
Member
| print("Solution does not exist!") | |
| print("No solution exists!") |
This comment has been minimized.
This comment has been minimized.
|
thanks @cclauss i applied black and changed the text to "No solution exists". I don't want to raise an exception to avoid having long error messages in the doctests (they are already 55 lines long) |
This method is recursive starting from (i, j) and going in one of four directions:
up, down, left, right.
If a path is found to destination it returns True otherwise it returns False.
Hasenn commentedSep 12, 2020
•
edited
Describe your change:
I've been correcting some spelling in docstrings and applying PEP8 autoformatting to scripts i read. I didn't make a single PR per script as the review should be pretty straightforward from reading the diffs, and i didn't change much per file.
Checklist:
Fixes: #{$ISSUE_NO}.