Skip to content

Commit

Permalink
Chore: pre-commit autoupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jul 15, 2024
1 parent 1a65fa8 commit 1a0a223
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
16 changes: 14 additions & 2 deletions src/osc_physrisk_financial/skeleton.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
This is a skeleton file that can serve as a starting point for a Python
"""This is a skeleton file that can serve as a starting point for a Python
console script. To run this script uncomment the following lines in the
``[options.entry_points]`` section in ``setup.cfg``::
Expand All @@ -13,11 +12,14 @@
also be used as template for Python modules.
Note:
----
This file can be renamed depending on your needs or safely removed if not needed.
References:
----------
- https://setuptools.pypa.io/en/latest/userguide/entry_point.html
- https://pip.pypa.io/en/stable/reference/pip_install
"""

import argparse
Expand All @@ -44,10 +46,13 @@ def fib(n):
"""Fibonacci example function
Args:
----
n (int): integer
Returns:
-------
int: n-th Fibonacci number
"""
assert n > 0
a, b = 1, 1
Expand All @@ -66,11 +71,14 @@ def parse_args(args):
"""Parse command line parameters
Args:
----
args (List[str]): command line parameters as list of strings
(for example ``["--help"]``).
Returns:
-------
:obj:`argparse.Namespace`: command line parameters namespace
"""
parser = argparse.ArgumentParser(description="Just a Fibonacci demonstration")
parser.add_argument(
Expand Down Expand Up @@ -102,7 +110,9 @@ def setup_logging(loglevel):
"""Setup basic logging
Args:
----
loglevel (int): minimum loglevel for emitting messages
"""
logformat = "[%(asctime)s] %(levelname)s:%(name)s:%(message)s"
logging.basicConfig(
Expand All @@ -117,8 +127,10 @@ def main(args):
``stdout`` in a nicely formatted message.
Args:
----
args (List[str]): command line parameters as list of strings
(for example ``["--verbose", "42"]``).
"""
args = parse_args(args)
setup_logging(args.loglevel)
Expand Down
3 changes: 1 addition & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
Dummy conftest.py for osc_physrisk_financial.
"""Dummy conftest.py for osc_physrisk_financial.
If you don't know what this is for, just leave it empty.
Read more about conftest.py under:
Expand Down

0 comments on commit 1a0a223

Please sign in to comment.