Skip to content

Commit

Permalink
Use @Property decorator to satisfy intersphinx. Ref #21. Workaround for
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jun 3, 2022
1 parent 6780477 commit 5d0970e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cssutils/css/cssstylesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,13 @@ def _getUsedURIs(self):
useduris.update(r2.selectorList._getUsedUris())
return useduris

def _setCssRules(self, cssRules):
@property
def cssRules(self):
"All Rules in this style sheet, a :class:`~cssutils.css.CSSRuleList`."
return self._cssRules

@cssRules.setter
def cssRules(self, cssRules):
"Set new cssRules and update contained rules refs."
cssRules.append = self.insertRule
cssRules.extend = self.insertRule
Expand All @@ -142,12 +148,6 @@ def _setCssRules(self, cssRules):

self._cssRules = cssRules

cssRules = property(
lambda self: self._cssRules,
_setCssRules,
"All Rules in this style sheet, a " ":class:`~cssutils.css.CSSRuleList`.",
)

def _getCssText(self):
"Textual representation of the stylesheet (a byte string)."
return cssutils.ser.do_CSSStyleSheet(self)
Expand Down

0 comments on commit 5d0970e

Please sign in to comment.