Skip to content

Commit

Permalink
Force Task to use kwargs for parameters other than config
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed May 3, 2023
1 parent 2bb33ac commit 6294098
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/lsst/pipe/base/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ class Task:
Notes
-----
The constructor must use keyword parameters for everything other than
the ``config`` parameter which can be positional or use keyword form.
Useful attributes include:
- ``log``: an `logging.Logger` or subclass.
Expand Down Expand Up @@ -154,6 +157,7 @@ class Task:
def __init__(
self,
config: Optional[Config] = None,
*,
name: Optional[str] = None,
parentTask: Optional[Task] = None,
log: Optional[Union[logging.Logger, lsst.utils.logging.LsstLogAdapter]] = None,
Expand Down

0 comments on commit 6294098

Please sign in to comment.