Skip to content
Merged
Changes from 1 commit
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
10 changes: 6 additions & 4 deletions scripts/generate_json_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@
import inspect
import json
import os
import sys
import types

import gcloud

This comment was marked as spam.

This comment was marked as spam.

import pdoc
from parinx.parser import parse_docstring
from parinx.errors import MethodParsingException

from verify_included_modules import get_public_modules

ABSOLUTE_LIBRARY_PATH = '/'.join(os.path.abspath(gcloud.__file__)
.split('/')[:-2])


This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

class Module(object):

Expand Down Expand Up @@ -291,9 +294,8 @@ def build_type(type_id, title, contents):

def clean_source_path(source):
source_path = ''
for path in sys.path:
if path in source:
source_path = source.replace(path, '')
if ABSOLUTE_LIBRARY_PATH in source:
source_path = source.replace(ABSOLUTE_LIBRARY_PATH, '')

This comment was marked as spam.

This comment was marked as spam.


return source_path

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.


Expand Down