Skip to content

Commit

Permalink
πŸ“ Cleanup README.md (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
slafs committed Jul 5, 2023
1 parent b4d30f0 commit f62f1a6
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Bump Pydantic is a tool to help you migrate your code from Pydantic V1 to V2.
- [BP002: Replace `Config` class by `model_config` attribute](#bp002-replace-config-class-by-model_config-attribute)
- [BP003: Replace `Field` old parameters to new ones](#bp003-replace-field-old-parameters-to-new-ones)
- [BP004: Replace imports](#bp004-replace-imports)
- [BP003: Replace `Config` class by `model_config`](#bp003-replace-config-class-by-model_config)
- [BP005: Replace `GenericModel` by `BaseModel`](#bp005-replace-genericmodel-by-basemodel)
- [BP006: Replace `__root__` by `RootModel`](#bp006-replace-__root__-by-rootmodel)
- [BP007: Replace decorators](#bp007-replace-decorators)
Expand Down Expand Up @@ -159,29 +158,6 @@ class User(BaseModel):
- βœ… Replace `BaseSettings` from `pydantic` to `pydantic_settings`.
- βœ… Replace `Color` and `PaymentCardNumber` from `pydantic` to `pydantic_extra_types`.

### BP003: Replace `Config` class by `model_config`

- βœ… Replace `Config` class by `model_config = ConfigDict()`.

The following code will be transformed:

```py
class User(BaseModel):
name: str

class Config:
extra = 'forbid'
```

Into:

```py
class User(BaseModel):
name: str

model_config = ConfigDict(extra='forbid')
```

### BP005: Replace `GenericModel` by `BaseModel`

- βœ… Replace `GenericModel` by `BaseModel`.
Expand Down

0 comments on commit f62f1a6

Please sign in to comment.