Add anti patterns sectiAdd “Anti-Patterns” section to README with explanations (#256)on (#459) * added default return value in get_localizer to prevent KeyError * cleaned up docstring formatting and removed unnecessary asterisks * Add Anti-Patterns section explaining discouraged design patterns
Recent Commits to python-patterns:master
-
Add anti patterns sectiAdd “Anti-Patterns” section to README with exp…
-
docs: add missing Servant pattern to README behavioral patterns table…
docs: add missing Servant pattern to README behavioral patterns table (#458)
-
Add type hint to remaining pattern modules (#410)
Add type hint to remaining pattern modules (#410) * Adding typehint * Update __exit__ type * fix black formatting --------- Co-authored-by: Roy, Debakar <debakar.roy@intel.com> Co-authored-by: Sakis Kasampalis <faif@users.noreply.github.com>
-
Translate several doctest tests to pytest (#414)
Translate several doctest tests to pytest (#414) Co-authored-by: Benjamin Townsend <germin8@jamminangels.net> Co-authored-by: Sakis Kasampalis <faif@users.noreply.github.com>
-
Remove pluggable-libs submodule and cleanup (#433) (#447)
Remove pluggable-libs submodule and cleanup (#433) (#447) * Remove pluggable-libs submodule and cleanup (#433) * Fix GitHub Actions output format error for multiline file lists * Add requirements-dev.txt so CI can install dev dependencies --------- Co-authored-by: Sakis Kasampalis <faif@users.noreply.github.com>
-
Cleanup pluggable-libs & fix CI file output (#433, #447) (#448)
Cleanup pluggable-libs & fix CI file output (#433, #447) (#448) * Remove pluggable-libs submodule and cleanup (#433) * Fix GitHub Actions output format error for multiline file lists * Add requirements-dev.txt so CI can install dev dependencies
-
Add type hints and standardized docstrings to observer.py (#454)
Add type hints and standardized docstrings to observer.py (#454)
-
Fix typo in top comment of catalog.py (#453)
Fix typo in top comment of catalog.py (#453)
-
fix: :bug: Fix potential warning in factory.py (#455)
fix: :bug: Fix potential warning in factory.py (#455) Use ellipsis replace pass to avoid potential warning: ``` "resource": "/d:/Github/Python/python-patterns/patterns/creational/factory.py", "owner": "pylance4", "value": "reportReturnType", "path": "/microsoft/pylance-release/blob/main/docs/diagnostics/reportReturnType.md", "severity": 8, "message": "Function with declared return type \"str\" must return value on all code paths\n \"None\" is not assignable to \"str\"", "source": "Pylance", "startLineNumber": 29, "startColumn": 37, "endLineNumber": 29, "endColumn": 40, "origin": "extHost1" }] ``` Using VS Code with Pylance, Python debugger, and Black Formatter.
-
fix(docs): correct typos in top comment of catalog.py (#451)
fix(docs): correct typos in top comment of catalog.py (#451)
-
Servant pattern (#413)
Servant pattern (#413) * Add docstring for Servant behavioral design pattern * Implement Servant class * Add docstest examples * Add testing for Servant class * Use fixtures for circle and rectangle
-
11 project format (#446)
11 project format (#446) * Migrates to pyproject.toml Switches the build system from setup.py to pyproject.toml. This change standardizes the project's build configuration, improves dependency management, and prepares the project for future enhancements. Removes unused requirements file. * Updates minimum Python version Corrects the minimum Python version specified in pyproject.toml. The project now requires Python 3.10 or higher. * Uses installable package for dev dependencies Updates the installation of development dependencies in the linting workflow to use the installable package. This simplifies dependency management and aligns with standard Python packaging practices. * Adds pyupgrade as a dev dependency Adds `pyupgrade` to the development dependencies. This enables developers to automatically upgrade Python syntax to more modern versions, improving code maintainability and readability.
-
Mvc add typing (#441)
Mvc add typing (#441) * Removed old Python versions * Added typing * Fixed bug * Removed bugs and added more types * Fixed bug on check if controller is defined * removed object definition from routes * I fixed a bug * Ädded comments and lost types * Fixed types for Router * Fixed lines * yeah sure * List dammit! * . * oops * .
-
Remove old py versions (#440)
Remove old py versions (#440) * Removed old Python versions * Removed 3.10 from tox and upgraded requirements-dev.txt becasue of higher versions in lint.sh * 3.13 changed to 3.12 * Adjusted lint_python workflow Upgraded flake8 to 7.1 * Added continue-on-error: true. So that if the workflow stop comes in error, it will continue. * Added workflow to check per PR * Moved workflow * Changed name workflow * Changed job name * Added approval for non-Python files and removed continue-on-error * Optimzed lint_pr.yml * Added fix for PyTest * Let pytest only test on changed python design patterns * Optimized Tox * Allow tox execute it's checks * Tox optimization 2 * Optimized check * Ignore setup.py from linting unless it is changes * Fixed bug * Testing a idea * Revert idea * added __init__.py to tests/ for tox * Let tox only test on Python files that are in the PR. * Adjusted .coveragerc * added usedevelop = true to tox.ini * Change cov from patterns to main * Rewrote check. * retry fixing coverage * Change cov to main * Added coverage run to execute pytest * changed cov to patterns * created pyproject.toml and moved old config to backup folder * Testing * Changed opts to doctest * Fix for error Unknown config option: randomly_seed * Trying fix for No data was collected. (no-data-collected) * Changed source from patterns to ./ * Changed source from patterns to ./
-
Merge pull request #443 from cdorsman/abstract-factory-fixes
Merge pull request #443 from cdorsman/abstract-factory-fixes Abstract factory fixes
-
t to T
t to T
-
woof
woof
-
Pet to type[Pet]
Pet to type[Pet]
-
Added type to random_animal
Added type to random_animal
-
Retry4
Retry4
-
Retry3
Retry3
-
fix doctest
fix doctest
-
Retry2
Retry2
-
Retry
Retry
-
Removed object type from init
Removed object type from init
-
- Moved AbstractExpert
- Moved AbstractExpert - Changed __init__ in AbstractExpert to abstract method - Added comments
-
Defined "random_animal" with random animal from list.
Defined "random_animal" with random animal from list.
-
Ädded comments and lost types
Ädded comments and lost types
-
I fixed a bug
I fixed a bug
-
removed object definition from routes
removed object definition from routes
-
Fixed bug on check if controller is defined
Fixed bug on check if controller is defined
-
Removed bugs and added more types
Removed bugs and added more types
-
Merge pull request #436 from danwald/update-delegation
Merge pull request #436 from danwald/update-delegation Highlight the need for a wrapper in delegate
-
Highlight the need for a wrapper in delegate
Highlight the need for a wrapper in delegate - It's required to capture the args/kwargs when called at run time. - Fix doctest output to include hints
-
Update README.md
Update README.md Remove mutable.ai references
-
Merge pull request #434 from cdorsman/lint-sh-cleanup
Merge pull request #434 from cdorsman/lint-sh-cleanup Lint sh cleanup
-
Merge pull request #432 from cdorsman/mvc-routing
Merge pull request #432 from cdorsman/mvc-routing Added routing
-
Cleaned up lint.sh

Cleaned up lint.sh
-
Added routing

Added routing
-
Update README.md
Update README.md Before diving into any of the patterns, readers should be reminded of two fundamental laws in software architecture: 1.Everything is a trade-ff 2."Why is more important than the how" So, readers face the nuances and reality of these patterns from the beginning. These two laws are coined by two thought leaders in software architecture: Mark Richards and Neal Ford. They have explained these two laws in various conference talks and books. For example, Here you can read about these two laws here: https://www.infoq.com/podcasts/software-architecture-hard-parts/ Also, here is a book for reference: https://a.co/d/fKOodW9
-
simplify patterns/behavioral/memento, changing Transactional from des…

simplify patterns/behavioral/memento, changing Transactional from descriptor class to decorator method