Commit Graph

7 Commits

Author SHA1 Message Date
Andrew Grangaard
551c65766d
[Mypy] fix other/least_recently_used (#5814)
* makes LRUCache constructor concrete

* fixes bug in dq_removal in other/least_recently_used

+ deque.remove() operates by value not index

* [mypy] Annotates other/least_recently_used over generic type

+ clean-up: rename key_reference to match type.

* [mypy] updates example to demonstrate LRUCache with complex type

* Adds doctest to other/least_recently_used

* mypy.ini: Remove exclude = (other/least_recently_used.py)

* Various mypy configs

* Delete mypy.ini

* Add mypy to .pre-commit-config.yaml

* mypy --ignore-missing-imports --install-types --non-interactive .

* mypy v0.910

* Pillow=8.3.7

* Pillow==8.3.7

* Pillow==8.3.2

* Update .pre-commit-config.yaml

* Update requirements.txt

* Update pre-commit.yml

* --install-types  # See mirrors-mypy README.md

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-11-16 15:01:17 +01:00
Joyce
7e81551d7b
[mypy] fix type annotations for other/least-recently-used.py (#5811) 2021-11-10 20:55:23 +01:00
Dhruv Manilawala
6f21f76696
fix(ci): Update pre-commit hooks and apply new black (#4359)
* fix(ci): Update pre-commit hooks and apply new black

* remove empty docstring
2021-04-26 07:46:50 +02:00
Du Yuanchao
4d0a8f2355
Optimized recursive_bubble_sort (#2410)
* optimized recursive_bubble_sort

* Fixed doctest error due whitespace

* reduce loop times for optimization

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-09-10 10:31:26 +02:00
Christian Clauss
5f4da5d616
isort --profile black . (#2181)
* updating DIRECTORY.md

* isort --profile black .

* Black after

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-07-06 09:44:19 +02:00
Christian Clauss
5df8aec66c
GitHub Action formats our code with psf/black (#1569)
* GitHub Action formats our code with psf/black

@poyea Your review please.

* fixup! Format Python code with psf/black push
2019-11-14 19:59:43 +01:00
Phileas
3ada8bb580 Page replacement algorithm, LRU (#871)
* Page replacement algorithm, LRU

* small rectifications

* Rename paging/LRU.py to other/least_recently_used.py
2019-10-28 19:04:26 +01:00