Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 Improve README and help command #100

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,19 @@ pip install bump-pydantic

`bump-pydantic` is a CLI tool, hence you can use it from your terminal.

To see the available options, you can run:
It's easy to use. If your project structure is:

```bash
bump-pydantic --help
repository/
└── my_package/
└── <python source files>
```

Then you'll want to do:

```bash
cd /path/to/repository
bump-pydantic my_package
```

### Check diff before applying changes
Expand Down
10 changes: 5 additions & 5 deletions bump_pydantic/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@
from bump_pydantic.codemods import Rule, gather_codemods
from bump_pydantic.codemods.class_def_visitor import ClassDefVisitor

app = Typer(
help="Convert Pydantic from V1 to V2 ♻️",
invoke_without_command=True,
add_completion=False,
)
app = Typer(invoke_without_command=True, add_completion=False)

P = ParamSpec("P")
T = TypeVar("T")
Expand All @@ -50,6 +46,10 @@ def main(
help="Show the version and exit.",
),
):
"""Convert Pydantic from V1 to V2 ♻️

Check the README for more information: https://github.com/pydantic/bump-pydantic.
"""
console = Console(log_time=True)
console.log("Start bump-pydantic.")
# NOTE: LIBCST_PARSER_TYPE=native is required according to https://github.com/Instagram/LibCST/issues/487.
Expand Down