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

Commit 2f98f22

Browse files
docs: fix type_ attribute name in the migration guide (#113)
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.
1 parent 2dd9522 commit 2f98f22

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

UPGRADING.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ If you experience issues or have questions, please file an [issue](https://githu
77
## Supported Python Versions
88

99
> **WARNING**: Breaking change
10-
The 3.0.0 release requires Python 3.6+.
10+
>
11+
> The 3.0.0 release requires Python 3.6+.
1112
1213

1314
## Method Calls
1415

1516
> **WARNING**: Breaking change
16-
Methods expect request objects. We provide a script that will convert most common use cases.
17+
>
18+
> Methods expect request objects. We provide a script that will convert most common use cases.
1719
1820
* Install the library
1921

@@ -100,7 +102,7 @@ response = client.create_entry_group(
100102
parent=parent,
101103
entry_group_id=entry_group_id,
102104
entry_group=entry_group
103-
) # Make an API request.
105+
) # Make an API request.
104106
```
105107

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

123125

124-
> **WARNING**: Breaking change
125-
The submodules `enums` and `types` have been removed.
126+
> **WARNING**: Breaking changes
127+
>
128+
> The submodules `enums` and `types` have been removed; the `type` attributes were renamed to `type_` to avoid name collisions.
126129
127130
**Before:**
128131
```py
@@ -136,7 +139,7 @@ entry.type = datacatalog_v1.enums.EntryType.FILESET
136139
```py
137140
from google.cloud import datacatalog_v1
138141
entry = datacatalog_v1.Entry()
139-
entry.type = datacatalog_v1.EntryType.FILESET
142+
entry.type_ = datacatalog_v1.EntryType.FILESET
140143
```
141144

142145
## Common Resource Path Helper Methods

0 commit comments

Comments
 (0)