Skip to content
Merged
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
4 changes: 2 additions & 2 deletions aioddd/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
from typing import Any, Dict, Optional, Type, TypeVar, Union


def get_env(key: str, default: Optional[str] = None) -> str: # pragma: no cover
def get_env(key: str, default: Optional[str] = None, cast_default_to_str: bool = True) -> Optional[str]:
"""Get an environment variable, return default if it is empty or doesn't exist."""
value = getenv(key, default)
return str(default) if not value or len(value) == 0 else value
return str(default) if cast_default_to_str else default if not value or len(value) == 0 else value


def get_simple_logger(
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = "aioddd"
version = "1.3.1"
version = "1.3.2"
description = "Async Python DDD utilities library."
license = "MIT"
authors = ["ticdenis <denisnavarroalcaide@outlook.es>"]
Expand All @@ -13,7 +13,7 @@ include = ["LICENSE", "README.md"]

[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools==58.5.3", "wheel==0.37.0"]
requires = ["setuptools==59.1.1", "wheel==0.37.0"]

[tool.black]
include = '\.pyi?$'
Expand Down
8 changes: 4 additions & 4 deletions pyscript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ export PYTHONUNBUFFERED=1

# shellcheck disable=SC2269
case "$function" in
-h | --help) function=help ;;
-v | --version) function=version ;;
help | version | build | build_docs | deploy | install | fmt | security_analysis | static_analysis | test | coverage | clean) function=$function ;;
-h | --help | help) function=help ;;
-v | --version | version) function=version ;;
build | build_docs | deploy | install | fmt | security_analysis | static_analysis | test | coverage | clean) function=$function ;;
*) echo >&2 "pyscript: '$function' is not a pyscript command." && exit 1 ;;
esac

eval "_$function" "$@"
"_$function" "$@"
10 changes: 5 additions & 5 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-r requirements.txt
autoflake==1.4
bandit==1.7.0
black==21.10b0
bandit==1.7.1
black==21.11b1
commitizen==2.20.0
isort==5.10.1
liccheck==0.6.2
Expand All @@ -16,9 +16,9 @@ pytest-asyncio==0.16.0
pytest-cov==3.0.0
pytest-xdist==2.4.0
pytoml==0.1.21
setuptools==58.5.3
shellcheck-py==0.7.2.1
twine==3.5.0
setuptools==59.1.1
shellcheck-py==0.8.0.1
twine==3.6.0
types-dataclasses==0.6.1; python_version <= "3.6"
types-backports==0.1.3; python_version <= "3.6"
wheel==0.37.0
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
backports-datetime-fromisoformat>=1.0.0; python_version <= "3.6"
dataclasses>=0.8; python_version <= "3.6"