Skip to content

Commit

Permalink
Merge branch 'sayanarijit:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Anti-Distinctlyminty authored Dec 1, 2021
2 parents 80c496b + e84a9f9 commit 811841b
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 409 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,8 @@ poetry install
- Keep it simple. Run `poetry run black` to auto format the code.
- Test your changes locally by running `poetry run pytest` (pass `--cov --cov-report html` for browsable coverage report).
- If you are familiar with [tox](https://tox.readthedocs.io), you may want to use it for testing in different python versions.

Alternatives
------------

- [environs](https://github.com/sloria/environs) - simplified environment variable parsing.
4 changes: 2 additions & 2 deletions expandvars.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
__email__ = "[email protected]"
__homepage__ = "https://github.com/sayanarijit/expandvars"
__description__ = "Expand system variables Unix style"
__version__ = "v0.6.5" # Also update pyproject.toml
__version__ = "v0.7.0" # Also update pyproject.toml
__license__ = "MIT"
__all__ = [
"BadSubstitution",
Expand Down Expand Up @@ -392,7 +392,7 @@ def expand_default(var, vars_, set_, nounset, indirect, environ, var_symbol):
for c in vars_:
if c == "}":
n = len(default) + 1
default_ = "".join(default)
default_ = expand("".join(default))
if set_ and var not in environ:
environ.update({var: default_})
return getenv(
Expand Down
Loading

0 comments on commit 811841b

Please sign in to comment.