Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
docs: fix type_ attribute name in the migration guide (#113)
Browse files Browse the repository at this point in the history
The main goal of this PR is to fix the `entry.type_` attribute name, which is incorrect in the current sample due to the breaking changes introduced by version 3.0.0.

I'm leveraging it to add blank lines between the **Breaking Change** blocks' titles and contents in order to improve readability.
  • Loading branch information
ricardolsmendes committed Feb 16, 2021
1 parent 2dd9522 commit 2f98f22
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions UPGRADING.md
Expand Up @@ -7,13 +7,15 @@ If you experience issues or have questions, please file an [issue](https://githu
## Supported Python Versions

> **WARNING**: Breaking change
The 3.0.0 release requires Python 3.6+.
>
> The 3.0.0 release requires Python 3.6+.

## Method Calls

> **WARNING**: Breaking change
Methods expect request objects. We provide a script that will convert most common use cases.
>
> Methods expect request objects. We provide a script that will convert most common use cases.
* Install the library

Expand Down Expand Up @@ -100,7 +102,7 @@ response = client.create_entry_group(
parent=parent,
entry_group_id=entry_group_id,
entry_group=entry_group
) # Make an API request.
) # Make an API request.
```

This call is invalid because it mixes `request` with a keyword argument `entry_group`. Executing this code
Expand All @@ -121,8 +123,9 @@ response = client.create_entry_group(
## Enums and Types


> **WARNING**: Breaking change
The submodules `enums` and `types` have been removed.
> **WARNING**: Breaking changes
>
> The submodules `enums` and `types` have been removed; the `type` attributes were renamed to `type_` to avoid name collisions.
**Before:**
```py
Expand All @@ -136,7 +139,7 @@ entry.type = datacatalog_v1.enums.EntryType.FILESET
```py
from google.cloud import datacatalog_v1
entry = datacatalog_v1.Entry()
entry.type = datacatalog_v1.EntryType.FILESET
entry.type_ = datacatalog_v1.EntryType.FILESET
```

## Common Resource Path Helper Methods
Expand Down

0 comments on commit 2f98f22

Please sign in to comment.