Commit Graph

217 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
2fb5becc4d [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-28 03:36:55 +00:00
Joelkurien
3d4acaaefb Added doctests 2024-10-28 14:36:29 +11:00
Joelkurien
5fe9e9b639 Added tests 2024-10-28 14:34:33 +11:00
pre-commit-ci[bot]
39fdc021ab [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-28 03:07:06 +00:00
Joelkurien
f9bf655086 Handled names 2024-10-28 14:06:39 +11:00
Joelkurien
bcf5beda92 handled name 2024-10-28 14:02:29 +11:00
pre-commit-ci[bot]
65f0d0c804 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-28 02:57:02 +00:00
Joelkurien
debba8c7dd Handled names 2024-10-28 13:56:35 +11:00
Joelkurien
8fc681807f Merge branch 'joel_graph' of https://github.com/joelkurien/Python into joel_graph 2024-10-28 13:46:43 +11:00
Joelkurien
6269fd68d0 Handled type annotation 2024-10-28 13:46:41 +11:00
pre-commit-ci[bot]
b911a5578c [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-28 02:43:45 +00:00
Joelkurien
32b9b8f6b4 Handled doctests 2024-10-28 13:43:18 +11:00
Joelkurien
14ddb93c6b Handled type annotation and doctests 2024-10-28 13:41:22 +11:00
Joelkurien
af534ade82 Handled type annotations and added doctests 2024-10-28 13:28:21 +11:00
pre-commit-ci[bot]
a00d41c861 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-28 02:18:28 +00:00
Joelkurien
9a4e1d333f Handled type annotation 2024-10-28 13:17:56 +11:00
Joelkurien
1fca8c6fc4 Merge branch 'joel_graph' of https://github.com/joelkurien/Python into joel_graph 2024-10-26 03:26:02 +11:00
Joelkurien
8006d48cac Added type annotation changes 2024-10-26 03:25:52 +11:00
pre-commit-ci[bot]
f62921cce0 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-25 16:23:57 +00:00
Joelkurien
b8c6beae72 Merge branch 'joel_graph' of https://github.com/joelkurien/Python into joel_graph 2024-10-26 03:23:26 +11:00
Joelkurien
f80afa35a8 Added type annotation for variables 2024-10-26 03:23:20 +11:00
pre-commit-ci[bot]
4982ff01b6 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-25 16:19:06 +00:00
Joelkurien
5a87d4fe9e Added method return type and resolved merge conflics 2024-10-26 03:18:39 +11:00
Joelkurien
a1ff5c95a3 Added return types to the functions 2024-10-26 03:17:05 +11:00
pre-commit-ci[bot]
e3db05b375 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-25 16:12:55 +00:00
Joelkurien
346a955946 Resolved issues regarding ruff testing and merge conflicts 2024-10-26 03:10:30 +11:00
Joelkurien
8286b5855a Resolving ruff issues 2024-10-26 03:04:37 +11:00
pre-commit-ci[bot]
18319a8733 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-25 16:01:30 +00:00
Joelkurien
11bfe18e0d Implementation of Johnson Graph Algorithm 2024-10-26 03:00:10 +11:00
Hardik Pawar
e20b503b24
Improve comments, add doctests for kahns_algorithm_topo.py (#11668)
* Improve comments, add doctests for kahns_algorithm_topo.py

* Improve function docstring

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Rename variables, remove print

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-10-04 02:06:08 -07:00
Christian Clauss
0177ae1cd5
Upgrade to Python 3.13 (#11588) 2024-09-30 23:01:15 +02:00
Maxim Smolskiy
e3fa014a5a
Fix ruff (#11527)
* updating DIRECTORY.md

* Fix ruff

* Fix

* Fix

* Fix

* Revert "Fix"

This reverts commit 5bc3bf3422.

* find_max.py: noqa: PLR1730

---------

Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2024-08-25 17:33:11 +02:00
pre-commit-ci[bot]
9190888f89
[pre-commit.ci] pre-commit autoupdate (#11481)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.0 → v0.5.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.0...v0.5.1)
- [github.com/tox-dev/pyproject-fmt: 2.1.3 → 2.1.4](https://github.com/tox-dev/pyproject-fmt/compare/2.1.3...2.1.4)

* updating DIRECTORY.md

* grid = np.char.chararray((n, n))

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2024-07-08 22:55:30 +02:00
pre-commit-ci[bot]
716bdeb68b
[pre-commit.ci] pre-commit autoupdate (#11473)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.10 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.10...v0.5.0)
- [github.com/pre-commit/mirrors-mypy: v1.10.0 → v1.10.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.10.0...v1.10.1)

* Fix ruff issues

* Fix ruff issues

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2024-07-02 07:02:29 +02:00
Snoppy
1cfca52db7
chore: fix typos (#11467)
* chore: fix typos

Signed-off-by: snoppy <michaleli@foxmail.com>

* Apply suggestions from code review

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

---------

Signed-off-by: snoppy <michaleli@foxmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2024-06-17 06:27:07 -07:00
pre-commit-ci[bot]
82aa909db7
[pre-commit.ci] pre-commit autoupdate (#11417)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.4 → v0.4.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.4...v0.4.5)
- [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](https://github.com/codespell-project/codespell/compare/v2.2.6...v2.3.0)
- [github.com/tox-dev/pyproject-fmt: 2.1.1 → 2.1.3](https://github.com/tox-dev/pyproject-fmt/compare/2.1.1...2.1.3)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* iterable

* at most

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2024-05-27 21:56:48 -04:00
Maxim Smolskiy
c599f6c910
Fix some SIM114 per file ignores (#11395)
* updating DIRECTORY.md

* Fix some SIM114 per file ignores

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix review issue

---------

Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-10 21:59:53 +02:00
Maxim Smolskiy
d016fda51c
Enable ruff RUF003 rule (#11376)
* Enable ruff RUF003 rule

* Update pyproject.toml

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2024-04-22 21:56:14 +02:00
Maxim Smolskiy
a42eb35702
Enable ruff E741 rule (#11370)
* Enable ruff E741 rule

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-19 21:30:22 +02:00
Maxim Smolskiy
93fb555e0a
Enable ruff SIM102 rule (#11341)
* Enable ruff SIM102 rule

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-02 03:27:56 +02:00
Maxim Smolskiy
39daaf8248
Enable ruff RUF100 rule (#11337) 2024-04-01 21:36:41 +02:00
Maxim Smolskiy
da47d5c88c
Enable ruff N999 rule (#11331)
* Enable ruff N999 rule

* updating DIRECTORY.md

---------

Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com>
2024-03-28 18:26:41 +01:00
Maxim Smolskiy
516a3028d1
Enable ruff PLR5501 rule (#11332)
* Enable ruff PLR5501 rule

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-28 18:25:41 +01:00
pre-commit-ci[bot]
bc8df6de31
[pre-commit.ci] pre-commit autoupdate (#11322)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.2...v0.3.2)
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.9.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-13 07:52:41 +01:00
AtomicVar
4b6f688344
Use compiled black as the pre-commit formatter (#11247)
* Use compiled black as the pre-commit formatter

* ruff-format

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Keep GitHub Actions up to date with Dependabot

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-16 09:39:54 +01:00
Clark
4151a13b57
add graphs/ant_colony_optimization_algorithms.py (#11163)
* add ant_colonyant_colony_optimization_algorithms.py

* Modify details

* Modify type annotation

* Add tests for KeyError, IndexError, StopIteration, etc.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-11-25 13:26:03 +01:00
Adam Ross
b0837d3985
Increase code coverage for dijkstra algorithm (#10695)
* Increase code coverage for dijkstra algorithm

* Add missing code coverage

Refactor to pass mypy

* Fix missing code coverage

* Remove code changes, keep doctest

* Remove ALL of the code changes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update dijkstra_algorithm.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-27 22:10:32 +02:00
Ed
a8f05fe0a5
Add doctests and type hints (#10974)
* Add doctests and type hints

* Apply suggestions from code review

* Update tarjans_scc.py

* Update tarjans_scc.py

---------

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-10-26 03:02:35 -04:00
shivaparihar6119
197604898b
Concatenates both check bipatrite graphs(bfs&dfs) (#10708)
* sync

* fixes#8098

* deleted:    graphs/check_bipartite_graph_all.py
	new file:   graphs/check_bipatrite,py

* renamed:    graphs/check_bipatrite,py -> graphs/check_bipatrite.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add the new tests

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-20 08:09:58 +02:00
RaymondDashWu
82fc24ce96
Test cases for check_bipartite_graph_bfs (#10688)
* [ADD] tests for check_bipartite_graph_bfs

* linter fix?

* linter fix

* [ADD] more test cases check_bipartite_graph_bfs

* doctest fixes. Forgot to add 'Traceback...'

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* missed a Traceback

* Update check_bipartite_graph_bfs.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-20 06:42:20 +02:00