Skip to content

Commit 54fde77

Browse files
committed
Update bugs template.
1 parent 61ac055 commit 54fde77

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/ISSUE_TEMPLATE/1-bug.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,28 @@ running it gives. The following snippet templates might help:
2121
1. Using the CLI function
2222
2323
```python
24-
import jsonargparse
24+
from jsonargparse import CLI
2525
2626
# Here define one or more functions or classes
2727
def func1(param1: int, ...):
2828
...
2929
3030
# Run the CLI providing the components
31-
jsonargparse.CLI([func1, ...], error_handler=None)
31+
CLI([func1, ...], exit_on_error=False)
3232
```
3333
3434
2. Manually constructing a parser
3535
3636
```python
37-
import jsonargparse
37+
from jsonargparse import ArgumentParser
3838
39-
parser = jsonargparse.ArgumentParser(error_handler=None)
39+
parser = ArgumentParser(exit_on_error=False)
4040
# Here add to the parser only argument(s) relevant to the problem
4141
4242
# If a yaml config is required, it can be included in the same snippet as follows:
4343
import yaml
4444
45-
parser.add_argument("--config", action=jsonargparse.ActionConfigFile)
45+
parser.add_argument("--config", action="config")
4646
config = yaml.safe_dump(
4747
{
4848
"key1": "val1",
@@ -68,7 +68,7 @@ parser.instantiate_classes(result)
6868

6969
<!-- Fill in the list below. -->
7070

71-
- jsonargparse version (e.g., 4.8.0):
72-
- Python version (e.g., 3.9):
73-
- How jsonargparse was installed (e.g. `pip install jsonargparse[all]`):
74-
- OS (e.g., Linux):
71+
- jsonargparse version:
72+
- Python version:
73+
- How jsonargparse was installed:
74+
- OS:

0 commit comments

Comments
 (0)