Create graphs/dijkstra_alternate.py#7405
Conversation
for more information, see https://pre-commit.ci
AtulRajput01
left a comment
There was a problem hiding this comment.
all set , all functions work well
|
@AtulRajput01 check pre-commit details and fix the issues. |
|
Instead of deleting someone else's work, let's move this to a separate file |
okay |
code fix . |
|
graphs/dijkstra.py:6:10: N802 function name 'printSolution' should be lowercase |
|
done sir |
cclauss
left a comment
There was a problem hiding this comment.
According to CONTRBUTING.md there needs to be at least one algorithmic function that takes in one or more parameters and returns one or more values. Algorithmic functions should not print().
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
okay sir ,i understood very well. |
There was a problem hiding this comment.
- In line 30, during function call, it should be
self.minimum_distance - All
distshould bedistancesor vice versa. - All
sptsetshould bespt_setor vice versaor a more self-documenting name. printsolutionshould beprint_solutionor vice versa.- Include doctests.
- Provide some comments in algorithm execution.
|
A general advice is to execute the code online/locally to fix the compilation(interpreter) errors. 👍🏻 |
for more information, see https://pre-commit.ci
it's working on my machine as well, then why pre-commit failure accur |
|
graphs/dijkstra.py:22:48: E712 comparison to False should be 'if cond is False:' or 'if not cond:' |
Abinashbunty
left a comment
There was a problem hiding this comment.
Moreover, check my comment above which Christian has edited. Use distances, spt_set and print_solution.
|
OK. I changed the filename, used self-documenting names for functions and variables, added type hints, and docstrings with doctests. I still have no clue what a better name for |
|
@cclauss |
Did you run the tests as mentioned in the contributing guideline? |
|
ok
…On Thu, Oct 20, 2022 at 9:15 AM Paul ***@***.***> wrote:
A general advice is to execute the code online/locally to fix the
compilation(interpreter) errors. 👍🏻
it's working on my machine as well, then why pre-commit failure accur
Did you run the tests as mentioned in the contributing guideline?
—
Reply to this email directly, view it on GitHub
<#7405 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWC54XNGECL7KXCONOD75ZDWEC57DANCNFSM6AAAAAARIJNPRI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}.