Commit Graph

8 Commits

Author SHA1 Message Date
DukicDev
c873fa0b1b
Correct grammar of comment in backtracking/hamiltonian_cycle.py (#4868) 2021-10-02 15:51:53 +02:00
Christian Clauss
cecf43d648
Pyupgrade to Python 3.9 (#4718)
* Pyupgrade to Python 3.9

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-09-07 13:37:03 +02:00
Dhruv Manilawala
f3ba9b6c50
[mypy] Add/fix type annotations for backtracking algorithms (#4055)
* Fix mypy errors for backtracking algorithms

* Fix CI failure
2020-12-24 18:16:21 +05:30
Christian Clauss
9200a2e543
from __future__ import annotations (#2464)
* from __future__ import annotations

* fixup! from __future__ import annotations

* fixup! from __future__ import annotations

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-09-23 13:30:13 +02:00
Hasenn
10aa214fcb
Docstrings and formatting improvements (#2418)
* Fix spelling in docstrings

* Improve comments and formatting

* Update print statement to reflect doctest change

* improve phrasing and apply black

* Update rat_in_maze.py

    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.

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-09-14 14:40:27 +02:00
Christian Clauss
9316e7c014
Set the Python file maximum line length to 88 characters (#2122)
* flake8 --max-line-length=88

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-06-16 10:09:19 +02:00
Christian Clauss
1f8a21d727
Tighten up psf/black and flake8 (#2024)
* Tighten up psf/black and flake8

* Fix some tests

* Fix some E741

* Fix some E741

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-05-22 08:10:11 +02:00
Saba Pochkhua
a859934105
Hamiltonian Cycle (#1930)
* add skeleton code

* add doctests

* add tests for util function + implement wrapper

* full implementation

* add ability to add starting verex for algorithm

* add static type checking

* add doc tests to validation method

* bug fix: doctests expected failing

* Update hamiltonian_cycle.py

* Update hamiltonian_cycle.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-05-02 21:13:56 +02:00