Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
0f5d2ca
Upgrade GitHub Actions
cclauss Jul 18, 2022
129cb3c
tox.ini: Add py310
cclauss Jul 18, 2022
3a02da2
Add Python 3.10
cclauss Jul 18, 2022
7c140eb
add type hints
abe-101 Jul 19, 2022
ca8706a
add type hints
abe-101 Jul 19, 2022
7ac7708
Merge pull request #395 from cclauss/patch-3
faif Jul 19, 2022
be59b53
Merge pull request #396 from abe-101/add-type-hints
faif Jul 19, 2022
9d4170d
issue 373: add more type hints
alexkahan Jul 27, 2022
f89c748
fix blackboard linter issue
alexkahan Aug 7, 2022
36f4fac
fix experts
alexkahan Aug 7, 2022
cc54961
Merge pull request #397 from alexkahan/issue-373-add-type-hints
faif Aug 8, 2022
ad6fd4b
Add Protocol to factory pattern
Jan 20, 2023
4e62fd0
Update chaining_method.py
Jan 21, 2023
93bfb7f
Merge pull request #403 from mfurquimdev/402-add-protocol-to-factory-…
faif Jan 27, 2023
d4b7f97
Merge pull request #404 from asaffifee/patch-1
faif Jan 27, 2023
76a5d21
simplify patterns/behavioral/memento, changing Transactional from des…
May 24, 2023
53ba9bc
add build and dist folders to .gitignore
grimley517 May 8, 2024
11113ea
linter updates - changes to comply with black
grimley517 May 8, 2024
af6fc3e
Additional linting error in patterns/behavioral/strategy.py added spa…
grimley517 May 12, 2024
e0b0061
extract complexity from docstring line
grimley517 May 12, 2024
87a1777
linter reformats quote marks in strategy pattern
grimley517 May 12, 2024
ffb45ca
put lint into a single shell command
grimley517 May 12, 2024
b6ceef4
Removed Random Petshop tests from abstract_factory.py as per #418
grimley517 May 16, 2024
e05b35f
linted abstract_factory.py
grimley517 May 16, 2024
9581e5a
updated readme to describe purpose of lint.sh file
grimley517 May 16, 2024
81e78fe
Merge pull request #417 from grimley517/#415-linter-preventing-prs
faif May 18, 2024
1a94d1f
Update README.md
azarboon Jun 11, 2024
f401747
Merge pull request #419 from azarboon/patch-1
faif Jun 19, 2024
cffe6cd
Update README.md
faif Sep 5, 2024
fa56fde
Update README.md
faif Sep 5, 2024
328b2d4
Merge pull request #408 from LeiYangGH/master
faif Sep 5, 2024
a400094
Added routing
Apr 23, 2025
8f0a91c
Cleaned up lint.sh
Apr 23, 2025
821a4dc
Merge pull request #432 from cdorsman/mvc-routing
faif Apr 25, 2025
ac1b2b4
Merge pull request #434 from cdorsman/lint-sh-cleanup
faif Apr 25, 2025
9016858
Update README.md
faif Apr 25, 2025
ce06e8b
Highlight the need for a wrapper in delegate
danwald Apr 26, 2025
75c27bf
Merge pull request #436 from danwald/update-delegation
faif May 2, 2025
ab82cbe
Removed old Python versions
cdorsman May 3, 2025
3b58565
Added typing
cdorsman May 3, 2025
24f8dcd
Fixed bug
cdorsman May 3, 2025
93b4e16
Removed bugs and added more types
cdorsman May 3, 2025
ccc17b4
Fixed bug on check if controller is defined
cdorsman May 3, 2025
65fcf56
removed object definition from routes
cdorsman May 3, 2025
6af5a82
I fixed a bug
cdorsman May 3, 2025
f6bc58d
Ädded comments and lost types
cdorsman May 3, 2025
58bd201
Defined "random_animal" with random animal from list.
cdorsman May 3, 2025
a50bb54
- Moved AbstractExpert
cdorsman May 4, 2025
9ad7206
Removed object type from init
cdorsman May 4, 2025
e834385
Retry
cdorsman May 4, 2025
8c0b293
Retry2
cdorsman May 4, 2025
092fdd3
fix doctest
cdorsman May 4, 2025
049d555
Retry3
cdorsman May 4, 2025
79a41c7
Retry4
cdorsman May 4, 2025
871fd8a
Added type to random_animal
cdorsman May 4, 2025
7f4e266
Pet to type[Pet]
cdorsman May 4, 2025
84b4b7b
woof
cdorsman May 4, 2025
7db462e
t to T
cdorsman May 4, 2025
07a5f33
Merge pull request #443 from cdorsman/abstract-factory-fixes
faif May 7, 2025
ecc5e17
Remove old py versions (#440)
cdorsman May 7, 2025
879ac01
Mvc add typing (#441)
cdorsman May 7, 2025
bee048e
11 project format (#446)
grimley517 Jul 19, 2025
3c0725a
Servant pattern (#413)
lmiguelvargasf Jul 19, 2025
ef74d59
fix(docs): correct typos in top comment of catalog.py (#451)
partth-code Sep 5, 2025
25c7356
fix: :bug: Fix potential warning in factory.py (#455)
Sorrow-Scarlet Oct 17, 2025
d842d10
Fix typo in top comment of catalog.py (#453)
Demagalawrence Oct 17, 2025
931ed9f
Add type hints and standardized docstrings to observer.py (#454)
Sai-Sravya-Thumati Oct 17, 2025
a72dead
Cleanup pluggable-libs & fix CI file output (#433, #447) (#448)
PraveenMudalgeri Oct 17, 2025
d1e262f
Remove pluggable-libs submodule and cleanup (#433) (#447)
PraveenMudalgeri Oct 17, 2025
11132fc
Translate several doctest tests to pytest (#414)
germin8 Oct 17, 2025
90016f4
Add type hint to remaining pattern modules (#410)
debakarr Oct 17, 2025
5110def
docs: add missing Servant pattern to README behavioral patterns table…
xingarr Nov 7, 2025
cd7f927
Add anti patterns sectiAdd “Anti-Patterns” section to README with exp…
ABHIRANJAN-KUMAR1 Nov 25, 2025
9bc7688
improved docstring formatting and added safe return in factory method…
ABHIRANJAN-KUMAR1 Jan 14, 2026
039baa3
Fixed an incorrect indentation. (#462)
kanade-ao Jan 21, 2026
4622c78
Improve type annotations in adapter pattern (#463)
JJuhi Jan 21, 2026
bc4c583
Test coverage changes added (#464)
Binilkks Feb 13, 2026
de0e3f8
chore: Update outdated GitHub Actions versions (#465)
pgoslatara Feb 13, 2026
39708b9
Docs: Add ecosystem examples to CoR, add Factory tests (#466)
SanjanaG-01 Feb 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
linter updates - changes to comply with black
  • Loading branch information
grimley517 committed May 8, 2024
commit 11113ea3cd9654350e34f50b6866ac6a5fd666d3
3 changes: 0 additions & 3 deletions patterns/behavioral/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def main_method(self) -> None:

# Alternative implementation for different levels of methods
class CatalogInstance:

"""catalog of multiple methods that are executed depending on an init

parameter
Expand Down Expand Up @@ -82,7 +81,6 @@ def main_method(self) -> None:


class CatalogClass:

"""catalog of multiple class methods that are executed depending on an init

parameter
Expand Down Expand Up @@ -121,7 +119,6 @@ def main_method(self):


class CatalogStatic:

"""catalog of multiple static methods that are executed depending on an init

parameter
Expand Down
1 change: 1 addition & 0 deletions patterns/behavioral/iterator_alt.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*TL;DR
Traverses a container and accesses the container's elements.
"""

from __future__ import annotations


Expand Down
2 changes: 1 addition & 1 deletion patterns/behavioral/memento.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
Provides the ability to restore an object to its previous state.
"""

from typing import Callable, List
from copy import copy, deepcopy
from typing import Callable, List


def memento(obj, deep=False):
Expand Down
1 change: 0 additions & 1 deletion patterns/behavioral/publish_subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
Author: https://github.com/HanWenfang
"""


from __future__ import annotations


Expand Down
1 change: 0 additions & 1 deletion patterns/behavioral/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
Enables selecting an algorithm at runtime.
"""


from __future__ import annotations

from typing import Callable
Expand Down
2 changes: 1 addition & 1 deletion patterns/creational/abstract_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ def __str__(self) -> str:


class PetShop:

"""A pet shop"""

def __init__(self, animal_factory: Type[Pet]) -> None:
Expand All @@ -80,6 +79,7 @@ def buy_pet(self, name: str) -> Pet:

# Additional factories:


# Create a random animal
def random_animal(name: str) -> Pet:
"""Let's be dynamic!"""
Expand Down
1 change: 1 addition & 0 deletions patterns/creational/borg.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
*TL;DR
Provides singleton-like behavior sharing state between instances.
"""

from typing import Dict


Expand Down
6 changes: 2 additions & 4 deletions patterns/creational/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
*TL;DR
Creates objects without having to specify the exact class.
"""
from typing import Dict
from typing import Protocol
from typing import Type

from typing import Dict, Protocol, Type


class Localizer(Protocol):
Expand All @@ -50,7 +49,6 @@ def localize(self, msg: str) -> str:


def get_localizer(language: str = "English") -> Localizer:

"""Factory"""
localizers: Dict[str, Type[Localizer]] = {
"English": EnglishLocalizer,
Expand Down
1 change: 1 addition & 0 deletions patterns/creational/prototype.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*TL;DR
Creates new object instances by cloning prototype.
"""

from __future__ import annotations

from typing import Any
Expand Down
1 change: 1 addition & 0 deletions patterns/other/blackboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

https://en.wikipedia.org/wiki/Blackboard_system
"""

from __future__ import annotations

import abc
Expand Down
1 change: 0 additions & 1 deletion patterns/other/graph_search.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
class GraphSearch:

"""Graph search emulation in python, from source
http://www.python.org/doc/essays/graphs/

Expand Down
2 changes: 1 addition & 1 deletion tests/behavioral/test_strategy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from patterns.behavioral.strategy import Order, ten_percent_discount, on_sale_discount
from patterns.behavioral.strategy import Order, on_sale_discount, ten_percent_discount


@pytest.fixture
Expand Down
1 change: 0 additions & 1 deletion tests/creational/test_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def test_frozen_pool(self):


class TestNaitivePool(unittest.TestCase):

"""def test_object(queue):
queue_object = QueueObject(queue, True)
print('Inside func: {}'.format(queue_object.object))"""
Expand Down