Skip to content

Commit

Permalink
Fix broken docstring references by just suppressing them. Ref #21.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jun 3, 2022
1 parent 5d0970e commit 63caad9
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions cssutils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def _style_declarations(base):

def getUrls(sheet):
"""Retrieve all ``url(urlstring)`` values (in e.g.
:class:`cssutils.css.CSSImportRule` or :class:`cssutils.css.CSSValue`
:class:`cssutils.css.CSSImportRule` or ``cssutils.css.CSSValue``
objects of given `sheet`.
:param sheet:
Expand Down Expand Up @@ -241,7 +241,7 @@ def _uri_values(style):
@functools.singledispatch
def replaceUrls(sheet, replacer, ignoreImportRules=False):
"""Replace all URLs in :class:`cssutils.css.CSSImportRule` or
:class:`cssutils.css.CSSValue` objects of given `sheet`.
``cssutils.css.CSSValue`` objects of given `sheet`.
:param sheet:
a :class:`cssutils.css.CSSStyleSheet` to be modified in place.
Expand Down
24 changes: 12 additions & 12 deletions cssutils/css/cssrule.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,39 @@ class CSSRule(cssutils.util.Base2):
both rule sets and at-rules. An implementation is expected to preserve
all rules specified in a CSS style sheet, even if the rule is not
recognized by the parser. Unrecognized rules are represented using the
:class:`CSSUnknownRule` interface.
``CSSUnknownRule`` interface.
"""

"""
CSSRule type constants.
An integer indicating which type of rule this is.
"""
UNKNOWN_RULE = 0
":class:`cssutils.css.CSSUnknownRule` (not used in CSSOM anymore)"
"``cssutils.css.CSSUnknownRule`` (not used in CSSOM anymore)"
STYLE_RULE = 1
":class:`cssutils.css.CSSStyleRule`"
"``cssutils.css.CSSStyleRule``"
CHARSET_RULE = 2
":class:`cssutils.css.CSSCharsetRule` (not used in CSSOM anymore)"
"``cssutils.css.CSSCharsetRule`` (not used in CSSOM anymore)"
IMPORT_RULE = 3
":class:`cssutils.css.CSSImportRule`"
"``cssutils.css.CSSImportRule``"
MEDIA_RULE = 4
":class:`cssutils.css.CSSMediaRule`"
"``cssutils.css.CSSMediaRule``"
FONT_FACE_RULE = 5
":class:`cssutils.css.CSSFontFaceRule`"
"``cssutils.css.CSSFontFaceRule``"
PAGE_RULE = 6
":class:`cssutils.css.CSSPageRule`"
"``cssutils.css.CSSPageRule``"
NAMESPACE_RULE = 10
""":class:`cssutils.css.CSSNamespaceRule`,
"""``cssutils.css.CSSNamespaceRule``,
Value has changed in 0.9.7a3 due to a change in the CSSOM spec."""
COMMENT = 1001 # was -1, cssutils only
""":class:`cssutils.css.CSSComment` - not in the offical spec,
"""``cssutils.css.CSSComment`` - not in the offical spec,
Value has changed in 0.9.7a3"""
VARIABLES_RULE = 1008
""":class:`cssutils.css.CSSVariablesRule` - experimental rule
"""``cssutils.css.CSSVariablesRule`` - experimental rule
not in the offical spec"""

MARGIN_RULE = 1006
""":class:`cssutils.css.MarginRule` - experimental rule
"""``cssutils.css.MarginRule`` - experimental rule
not in the offical spec"""

_typestrings = {
Expand Down
2 changes: 1 addition & 1 deletion cssutils/css/cssstyledeclaration.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ def getPropertyCSSValue(self, name, normalize=True):
If ``False`` may return **NOT** the effective value but the
effective for the unnormalized name.
:returns:
:class:`~cssutils.css.CSSValue`, the value of the effective
``~cssutils.css.CSSValue``, the value of the effective
property if it has been explicitly set for this declaration block.
(DOM)
Expand Down
18 changes: 9 additions & 9 deletions cssutils/profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ class Profiles(object):
:meth:`~cssutils.profiles.Profiles.propertiesByProfile` to
get a list of defined properties):
:attr:`~cssutils.profiles.Profiles.CSS_LEVEL_2`
``~cssutils.profiles.Profiles.CSS_LEVEL_2``
Properties defined by CSS2.1
:attr:`~cssutils.profiles.Profiles.CSS3_BASIC_USER_INTERFACE`
``~cssutils.profiles.Profiles.CSS3_BASIC_USER_INTERFACE``
Currently resize and outline properties only
:attr:`~cssutils.profiles.Profiles.CSS3_BOX`
``~cssutils.profiles.Profiles.CSS3_BOX``
Currently overflow related properties only
:attr:`~cssutils.profiles.Profiles.CSS3_COLOR`
``~cssutils.profiles.Profiles.CSS3_COLOR``
CSS 3 color properties
:attr:`~cssutils.profiles.Profiles.CSS3_PAGED_MEDIA`
``~cssutils.profiles.Profiles.CSS3_PAGED_MEDIA``
As defined at http://www.w3.org/TR/css3-page/ (at 090307)
Predefined macros are:
:attr:`~cssutils.profiles.Profiles._TOKEN_MACROS`
``~cssutils.profiles.Profiles._TOKEN_MACROS``
Macros containing the token values as defined to CSS2
:attr:`~cssutils.profiles.Profiles._MACROS`
``~cssutils.profiles.Profiles._MACROS``
Additional general macros.
If you want to redefine any of these macros do this in your custom
Expand Down Expand Up @@ -279,7 +279,7 @@ def addProfile(self, profile, properties, macros=None):
:param macros:
may be used in the given properties definitions. There are some
predefined basic macros which may always be used in
:attr:`Profiles._TOKEN_MACROS` and :attr:`Profiles._MACROS`.
``Profiles._TOKEN_MACROS`` and ``Profiles._MACROS``.
"""
if macros:
# check if known macros would change and if yes reset properties
Expand Down Expand Up @@ -321,7 +321,7 @@ def removeProfile(self, profile=None, all=False):
:param all:
if ``True`` removes all profiles to start with a clean state
:exceptions:
- :exc:`cssutils.profiles.NoSuchProfileException`:
- ``cssutils.profiles.NoSuchProfileException``:
If given `profile` cannot be found.
"""
if all:
Expand Down
4 changes: 2 additions & 2 deletions cssutils/stylesheets/mediaquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class MediaQuery(cssutils.util._NewBase): # cssutils.util.Base):
"""
A Media Query consists of one of :const:`MediaQuery.MEDIA_TYPES`
A Media Query consists of one of ``MediaQuery.MEDIA_TYPES``
and one or more expressions involving media features.
Format::
Expand Down Expand Up @@ -229,7 +229,7 @@ def _setMediaType(self, mediaType):
lambda self: self._mediaType,
_setMediaType,
doc="The media type of this MediaQuery (one of "
":attr:`MEDIA_TYPES`) but only if it is a simple MediaType!",
"``MEDIA_TYPES``) but only if it is a simple MediaType!",
)

wellformed = property(lambda self: self._wellformed)

0 comments on commit 63caad9

Please sign in to comment.