Skip to content

Commit

Permalink
Update conf.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikeshbajaj authored Nov 9, 2022
1 parent 7eeab1e commit 8e59450
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import re
#import re
import os, sys, re
import datetime

# -- Project information -----------------------------------------------------
Expand Down Expand Up @@ -196,8 +197,8 @@ def linkcode_resolve(domain, info):
obj = getattr(obj, "__wrapped__", obj)
# SciPy's distributions are instances of *_gen. Point to this
# class since it contains the implementation of all the methods.
if isinstance(obj, (rv_generic, multi_rv_generic)):
obj = obj.__class__
#if isinstance(obj, (rv_generic, multi_rv_generic)):
# obj = obj.__class__
try:
fn = inspect.getsourcefile(obj)
except Exception:
Expand All @@ -220,7 +221,7 @@ def linkcode_resolve(domain, info):
else:
linespec = ""

startdir = os.path.abspath(os.path.join(dirname(scipy.__file__), '..'))
startdir = os.path.abspath(os.path.join(dirname(spkit.__file__), '..'))
fn = relpath(fn, start=startdir).replace(os.path.sep, '/')

if fn.startswith('spkit/'):
Expand All @@ -232,7 +233,7 @@ def linkcode_resolve(domain, info):
return "https://github.com/Nikeshbajaj/spkit/blob/main/%s%s" % (
fn, linespec)
else:
return "https://github.com/Nikeshbajaj/spkit/blob/v%s/%s%s" % (
scipy.__version__, fn, linespec)
return "https://github.com/Nikeshbajaj/spkit/blob/%s/%s%s" % (
spkit.__version__, fn, linespec)
else:
return None

0 comments on commit 8e59450

Please sign in to comment.