Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions patterns/behavioral/chaining_method.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import annotations


class Person:
def __init__(self, name: str) -> None:
Expand Down
2 changes: 0 additions & 2 deletions patterns/behavioral/iterator_alt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
Traverses a container and accesses the container's elements.
"""

from __future__ import annotations


class NumberWords:
"""Counts by word numbers, up to a maximum of five"""
Expand Down
2 changes: 0 additions & 2 deletions patterns/behavioral/mediator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
Encapsulates how a set of objects interact.
"""

from __future__ import annotations


class ChatRoom:
"""Mediator class"""
Expand Down
2 changes: 0 additions & 2 deletions patterns/behavioral/observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

# observer.py

from __future__ import annotations


class Observer:
def update(self, subject: Subject) -> None:
Expand Down
2 changes: 0 additions & 2 deletions patterns/behavioral/publish_subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
Author: https://github.com/HanWenfang
"""

from __future__ import annotations


class Provider:
def __init__(self) -> None:
Expand Down
2 changes: 0 additions & 2 deletions patterns/behavioral/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
Implements state transitions by invoking methods from the pattern's superclass.
"""

from __future__ import annotations


class State:
"""Base state. This is to share functionality"""
Expand Down
2 changes: 0 additions & 2 deletions patterns/behavioral/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
Enables selecting an algorithm at runtime.
"""

from __future__ import annotations

from collections.abc import Callable
from typing import TypeAlias

Expand Down
2 changes: 0 additions & 2 deletions patterns/creational/prototype.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
Creates new object instances by cloning prototype.
"""

from __future__ import annotations

from typing import Any


Expand Down
2 changes: 0 additions & 2 deletions patterns/fundamental/delegation_pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
Allows object composition to achieve the same code reuse as inheritance.
"""

from __future__ import annotations

from collections.abc import Callable
from typing import Any

Expand Down
2 changes: 0 additions & 2 deletions patterns/structural/front_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
Provides a centralized entry point that controls and manages request handling.
"""

from __future__ import annotations

from typing import Any


Expand Down
Loading