Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 43751cf

Browse files
authored
fix: remove inheritance details (#268)
* fix: remove inheritance details * test: update goldens
1 parent 10ecc44 commit 43751cf

177 files changed

Lines changed: 0 additions & 1058 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docfx_yaml/extension.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,6 @@ def process_docstring(app, _type, name, obj, options, lines):
11011101
else:
11021102
app.env.docfx_yaml_functions[cls].append(datam)
11031103

1104-
insert_inheritance(app, _type, obj, datam)
11051104
insert_children_on_module(app, _type, datam)
11061105
insert_children_on_class(app, _type, datam)
11071106
insert_children_on_function(app, _type, datam)
@@ -1129,25 +1128,6 @@ def process_signature(app, _type, name, obj, options, signature, return_annotati
11291128
app.env.docfx_signature_funcs_methods[name] = signature
11301129

11311130

1132-
def insert_inheritance(app, _type, obj, datam):
1133-
1134-
def collect_inheritance(base, to_add):
1135-
for new_base in base.__bases__:
1136-
new_add = {'type': _fullname(new_base)}
1137-
collect_inheritance(new_base, new_add)
1138-
if 'inheritance' not in to_add:
1139-
to_add['inheritance'] = []
1140-
to_add['inheritance'].append(new_add)
1141-
1142-
if hasattr(obj, '__bases__'):
1143-
if 'inheritance' not in datam:
1144-
datam['inheritance'] = []
1145-
for base in obj.__bases__:
1146-
to_add = {'type': _fullname(base)}
1147-
collect_inheritance(base, to_add)
1148-
datam['inheritance'].append(to_add)
1149-
1150-
11511131
def insert_children_on_module(app, _type, datam):
11521132
"""
11531133
Insert children of a specific module
@@ -1718,18 +1698,6 @@ def convert_module_to_package_if_needed(obj):
17181698
if obj.get('type', '') == 'package' and obj.get('kind', '') != 'distribution':
17191699
obj['kind'] = 'import'
17201700

1721-
try:
1722-
if remove_inheritance_for_notfound_class:
1723-
if 'inheritance' in obj:
1724-
python_sdk_name = obj['uid'].split('.')[0]
1725-
obj['inheritance'] = [n for n in obj['inheritance'] if not n['type'].startswith(python_sdk_name) or
1726-
n['type'] in app.env.docfx_info_uid_types]
1727-
if not obj['inheritance']:
1728-
obj.pop('inheritance')
1729-
1730-
except NameError:
1731-
pass
1732-
17331701
# Extract any missing cross references where applicable.
17341702
# Potential targets are instances of full uid shown, or
17351703
# if we find a short form of the uid of one of current

tests/testdata/goldens/gapic-auto/google.cloud.texttospeech_v1.services.text_to_speech.TextToSpeechAsyncClient.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ items:
2626
- google.cloud.texttospeech_v1.services.text_to_speech.TextToSpeechAsyncClient.transport
2727
class: google.cloud.texttospeech_v1.services.text_to_speech.TextToSpeechAsyncClient
2828
fullName: google.cloud.texttospeech_v1.services.text_to_speech.TextToSpeechAsyncClient
29-
inheritance:
30-
- type: builtins.object
3129
langs:
3230
- python
3331
module: google.cloud.texttospeech_v1.services.text_to_speech
@@ -52,8 +50,6 @@ items:
5250
- attributes: []
5351
class: google.cloud.texttospeech_v1.services.text_to_speech.TextToSpeechAsyncClient
5452
fullName: google.cloud.texttospeech_v1.services.text_to_speech.TextToSpeechAsyncClient
55-
inheritance:
56-
- type: builtins.object
5753
langs:
5854
- python
5955
module: google.cloud.texttospeech_v1.services.text_to_speech

tests/testdata/goldens/gapic-auto/google.cloud.texttospeech_v1.services.text_to_speech.TextToSpeechClient.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ items:
2626
- google.cloud.texttospeech_v1.services.text_to_speech.TextToSpeechClient.transport
2727
class: google.cloud.texttospeech_v1.services.text_to_speech.TextToSpeechClient
2828
fullName: google.cloud.texttospeech_v1.services.text_to_speech.TextToSpeechClient
29-
inheritance:
30-
- type: builtins.object
3129
langs:
3230
- python
3331
module: google.cloud.texttospeech_v1.services.text_to_speech
@@ -52,8 +50,6 @@ items:
5250
- attributes: []
5351
class: google.cloud.texttospeech_v1.services.text_to_speech.TextToSpeechClient
5452
fullName: google.cloud.texttospeech_v1.services.text_to_speech.TextToSpeechClient
55-
inheritance:
56-
- type: builtins.object
5753
langs:
5854
- python
5955
module: google.cloud.texttospeech_v1.services.text_to_speech

tests/testdata/goldens/gapic-auto/google.cloud.texttospeech_v1.types.AudioConfig.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ items:
4646
children: []
4747
class: google.cloud.texttospeech_v1.types.AudioConfig
4848
fullName: google.cloud.texttospeech_v1.types.AudioConfig
49-
inheritance:
50-
- inheritance:
51-
- type: builtins.object
52-
type: proto.message.Message
5349
langs:
5450
- python
5551
module: google.cloud.texttospeech_v1.types

tests/testdata/goldens/gapic-auto/google.cloud.texttospeech_v1.types.AudioEncoding.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@ items:
55
children: []
66
class: google.cloud.texttospeech_v1.types.AudioEncoding
77
fullName: google.cloud.texttospeech_v1.types.AudioEncoding
8-
inheritance:
9-
- inheritance:
10-
- inheritance:
11-
- inheritance:
12-
- type: builtins.object
13-
type: builtins.int
14-
- inheritance:
15-
- type: builtins.object
16-
type: enum.Enum
17-
type: enum.IntEnum
18-
type: proto.enums.Enum
198
langs:
209
- python
2110
module: google.cloud.texttospeech_v1.types

tests/testdata/goldens/gapic-auto/google.cloud.texttospeech_v1.types.CustomVoiceParams.ReportedUsage.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@ items:
55
children: []
66
class: google.cloud.texttospeech_v1.types.CustomVoiceParams.ReportedUsage
77
fullName: google.cloud.texttospeech_v1.types.CustomVoiceParams.ReportedUsage
8-
inheritance:
9-
- inheritance:
10-
- inheritance:
11-
- inheritance:
12-
- type: builtins.object
13-
type: builtins.int
14-
- inheritance:
15-
- type: builtins.object
16-
type: enum.Enum
17-
type: enum.IntEnum
18-
type: proto.enums.Enum
198
langs:
209
- python
2110
module: google.cloud.texttospeech_v1.types.CustomVoiceParams

tests/testdata/goldens/gapic-auto/google.cloud.texttospeech_v1.types.CustomVoiceParams.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ items:
1313
- google.cloud.texttospeech_v1.types.CustomVoiceParams.ReportedUsage
1414
class: google.cloud.texttospeech_v1.types.CustomVoiceParams
1515
fullName: google.cloud.texttospeech_v1.types.CustomVoiceParams
16-
inheritance:
17-
- inheritance:
18-
- type: builtins.object
19-
type: proto.message.Message
2016
langs:
2117
- python
2218
module: google.cloud.texttospeech_v1.types

tests/testdata/goldens/gapic-auto/google.cloud.texttospeech_v1.types.ListVoicesRequest.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ items:
1414
children: []
1515
class: google.cloud.texttospeech_v1.types.ListVoicesRequest
1616
fullName: google.cloud.texttospeech_v1.types.ListVoicesRequest
17-
inheritance:
18-
- inheritance:
19-
- type: builtins.object
20-
type: proto.message.Message
2117
langs:
2218
- python
2319
module: google.cloud.texttospeech_v1.types

tests/testdata/goldens/gapic-auto/google.cloud.texttospeech_v1.types.ListVoicesResponse.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ items:
88
children: []
99
class: google.cloud.texttospeech_v1.types.ListVoicesResponse
1010
fullName: google.cloud.texttospeech_v1.types.ListVoicesResponse
11-
inheritance:
12-
- inheritance:
13-
- type: builtins.object
14-
type: proto.message.Message
1511
langs:
1612
- python
1713
module: google.cloud.texttospeech_v1.types

tests/testdata/goldens/gapic-auto/google.cloud.texttospeech_v1.types.SsmlVoiceGender.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@ items:
55
children: []
66
class: google.cloud.texttospeech_v1.types.SsmlVoiceGender
77
fullName: google.cloud.texttospeech_v1.types.SsmlVoiceGender
8-
inheritance:
9-
- inheritance:
10-
- inheritance:
11-
- inheritance:
12-
- type: builtins.object
13-
type: builtins.int
14-
- inheritance:
15-
- type: builtins.object
16-
type: enum.Enum
17-
type: enum.IntEnum
18-
type: proto.enums.Enum
198
langs:
209
- python
2110
module: google.cloud.texttospeech_v1.types

0 commit comments

Comments
 (0)