Skip to content

Commit

Permalink
chore: Finish adding docstrings to all module functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
scmbradley committed May 20, 2021
1 parent 1ed588f commit 950c69a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
This changelog follows the conventions of [keep a changelog](https://keepachangelog.com/en/1.0.0/)
and [semantic versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### OTHER

- Added docstrings for all the functions.

## v0.3.0

### ADDED
Expand Down
7 changes: 7 additions & 0 deletions taskw.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,20 @@


def _default(name, default="", arg_type=str):
"""
Set a parameter based on OS variable.
Fix the argument type and fall back on given default.
"""
val = default
if name in os.environ:
val = os.environ[name]
return arg_type(val)


def _strbool(s):
"""Return True if argument is t,T,true,TRUE etc."""
return s.lower() in ["t", "true", "1"]


Expand Down

0 comments on commit 950c69a

Please sign in to comment.