-
-
Notifications
You must be signed in to change notification settings - Fork 28
Make cssText return str instead of bytes
#77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 6 commits
100429b
9d50efe
9d1c321
3e38a6a
fb44c97
204bad3
959cf81
7ef8106
8ebbbcf
0b048ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -408,8 +408,7 @@ def do_CSSStyleSheet(self, stylesheet): | |
| except (IndexError, AttributeError): | ||
| encoding = 'UTF-8' | ||
|
|
||
| # TODO: py3 return b str but tests use unicode? | ||
| return text.encode(encoding, 'escapecss') | ||
| return text.encode(encoding, 'escapecss').decode(encoding) | ||
|
Comment on lines
404
to
+411
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot Can this be simplified to simply return text? If not, why not?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No — simplifying to |
||
|
|
||
| def do_CSSComment(self, rule): | ||
| """ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Remove
(a text string), redundant (same for line 364 below).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 8ebbbcf — removed
(a text string)from both the_getCssTextdocstring (line 149) and thecssTextproperty docstring (line 364).