Skip to content

Commit

Permalink
⚫ Fade to black.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jun 9, 2023
1 parent f8d7c19 commit 9e6cee0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
8 changes: 2 additions & 6 deletions cssutils/css/cssrule.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,7 @@ def _prepareInsertRule(self, rule, index=None):
tempsheet.cssRules
and not isinstance(tempsheet.cssRules[0], cssutils.css.CSSRule)
):
self._log.error(
f'{self.__class__.__name__}: Invalid Rule: {rule}'
)
self._log.error(f'{self.__class__.__name__}: Invalid Rule: {rule}')
return False, False
rule = tempsheet.cssRules[0]

Expand All @@ -267,9 +265,7 @@ def _prepareInsertRule(self, rule, index=None):
return True, True

elif not isinstance(rule, cssutils.css.CSSRule):
self._log.error(
f'{rule}: Not a CSSRule: {self.__class__.__name__}'
)
self._log.error(f'{rule}: Not a CSSRule: {self.__class__.__name__}')
return False, False

return rule, index
Expand Down
8 changes: 2 additions & 6 deletions cssutils/css/cssvariablesdeclaration.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,7 @@ def setVariable(self, variableName, value):
normalize(variableName), 'variableName', Sequence(PreDef.ident())
)
if not wellformed:
self._log.error(
f'Invalid variableName: {variableName!r}: {value!r}'
)
self._log.error(f'Invalid variableName: {variableName!r}: {value!r}')
else:
# check value
if isinstance(value, PropertyValue):
Expand All @@ -297,9 +295,7 @@ def setVariable(self, variableName, value):
v = PropertyValue(cssText=value, parent=self)

if not v.wellformed:
self._log.error(
f'Invalid variable value: {variableName!r}: {value!r}'
)
self._log.error(f'Invalid variable value: {variableName!r}: {value!r}')
else:
# update seq
self.seq._readonly = False
Expand Down
4 changes: 1 addition & 3 deletions tools/try.py
Original file line number Diff line number Diff line change
Expand Up @@ -1218,9 +1218,7 @@ def fetchUrlGAE(self):
try:
r = urlfetch.fetch(url, method=urlfetch.GET)
except urlfetch.Error as e:
cssutils.log.warn(
f'Error opening url={url!r}: {e.message}', error=IOError
)
cssutils.log.warn(f'Error opening url={url!r}: {e.message}', error=IOError)
else:
if r.status_code == 200:
# find mimetype and encoding
Expand Down

0 comments on commit 9e6cee0

Please sign in to comment.