Skip to content

Commit

Permalink
Merge pull request #5 from florianmahner/import
Browse files Browse the repository at this point in the history
Add argument parser init
  • Loading branch information
florianmahner authored Jun 17, 2024
2 parents a4e5701 + b5d8e40 commit bedc659
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ bar = "hello"
At the core of this module is the [TOML ArgumentParser](https://github.com/florianmahner/toml-argparse/blob/main/tomlparse/argparse.py), a simple wrapper of the original argparse module. To use the TOML arguments for our project, we we would create an `ArgumentParser` as usual:

```python
from tomlparse import argparse
parser = argparse.ArgumentParser()
import tomlparse
parser = tomlparse.ArgumentParser()
parser.add_argument("--foo", type-int, default=0)
parser.add_argument("--bar", type=str, default="")
parser.parse_args()
Expand Down Expand Up @@ -119,4 +119,5 @@ python experiment.py --config "example.toml" --table "general" --foo 100
Please have a look at the contribution guidlines in `Contributing.rst`.

---
Repository initiated with [fpgmaas/cookiecutter-poetry](https://github.com/fpgmaas/cookiecutter-poetry).

Repository initiated with [fpgmaas/cookiecutter-poetry](https://github.com/fpgmaas/cookiecutter-poetry).
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ ignore = [

[tool.ruff.per-file-ignores]
"tests/*" = ["S101"]
"**/__init__.py" = ["ALL"]


[tool.coverage.report]
skip_empty = true
Expand Down
1 change: 1 addition & 0 deletions tomlparse/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .argparse import ArgumentParser

0 comments on commit bedc659

Please sign in to comment.