Skip to content

Commit

Permalink
Merge pull request #1965 from eirannejad/develop
Browse files Browse the repository at this point in the history
Clean code samples for new documentation process
  • Loading branch information
jmcouffin authored Oct 22, 2023
2 parents 360e0b8 + 70a3608 commit 829b95d
Show file tree
Hide file tree
Showing 33 changed files with 526 additions and 306 deletions.
24 changes: 14 additions & 10 deletions pyrevitlib/pyrevit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
"""pyRevit root level config for all pyrevit sub-modules.
Examples:
>>> from pyrevit import DB, UI
>>> from pyrevit import PyRevitException, PyRevitIOError
>>> # pyrevit module has global instance of the
>>> # _HostAppPostableCommand and _ExecutorParams classes already created
>>> # import and use them like below
>>> from pyrevit import HOST_APP
>>> from pyrevit import EXEC_PARAMS
'''python
from pyrevit import DB, UI
from pyrevit import PyRevitException, PyRevitIOError
# pyrevit module has global instance of the
# _HostAppPostableCommand and _ExecutorParams classes already created
# import and use them like below
from pyrevit import HOST_APP
from pyrevit import EXEC_PARAMS
'''
"""
#pylint: disable=W0703,C0302,C0103,C0413,raise-missing-from
import sys
Expand Down Expand Up @@ -180,8 +182,10 @@ class _HostApplication(object):
postable commands, and other functionality.
Examples:
>>> hostapp = _HostApplication()
>>> hostapp.is_newer_than(2017)
'''python
hostapp = _HostApplication()
hostapp.is_newer_than(2017)
'''
"""

def __init__(self):
Expand Down
4 changes: 3 additions & 1 deletion pyrevitlib/pyrevit/api.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
"""Provide access to Revit API.
Examples:
>>> from pyrevit.api import AdWindows
'''python
from pyrevit.api import AdWindows
'''
"""
import os.path as op

Expand Down
6 changes: 4 additions & 2 deletions pyrevitlib/pyrevit/compat.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
"""python engine compatibility module.
Examples:
>>> from pyrevit.compat import IRONPY277
>>> from pyrevit.compat import safe_strtype
'''python
from pyrevit.compat import IRONPY277
from pyrevit.compat import safe_strtype
'''
"""

import sys
Expand Down
Loading

0 comments on commit 829b95d

Please sign in to comment.