diff --git a/.github/workflows/pydosctyle.yml b/.github/workflows/pydosctyle.yml new file mode 100644 index 0000000..2e52c31 --- /dev/null +++ b/.github/workflows/pydosctyle.yml @@ -0,0 +1,25 @@ +name: Lint and Test + +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pydocstyle + + - name: Run pydocstyle + run: | + pydocstyle diff --git a/.pydocstyle b/.pydocstyle new file mode 100644 index 0000000..f5ddec2 --- /dev/null +++ b/.pydocstyle @@ -0,0 +1,2 @@ +[pydocstyle] +ignore = D203,D213,D406,D407,D415,D100,D101,D102,D103,D104,D107,D200,D205,D212,D400,D401,D402,D404 diff --git a/src/tirith/logging.py b/src/tirith/logging.py index 121b4eb..5d05502 100644 --- a/src/tirith/logging.py +++ b/src/tirith/logging.py @@ -1,3 +1,7 @@ +""" +Sets up logging configuration for the application. +""" + import logging import logging.config import sys @@ -38,6 +42,13 @@ def setup_logging(verbose: bool = False): + """ + Set up logging configuration. + + :param verbose: If set to `True` will log all messages higher than DEBUG + level, otherwise it will log the messages that are higher + than INFO level ('INFO', 'WARNING', 'CRITICAL') + """ if verbose: DEFAULT_LOGGING_CONFIG["root"]["handlers"] = ["console_stderr_verbose"] logging.config.dictConfig(DEFAULT_LOGGING_CONFIG)