Skip to content

Commit

Permalink
fix building and linting on windows (#2733)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTripleV authored Sep 10, 2024
1 parent 115d5ce commit cbf2c5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/doc8_redown.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def new_setattr(self, name, value):
if name == "_raw_content" and value is not None:
value = redown(value.decode("utf-8")).encode("utf-8")
value = redown(value.decode("utf-8").replace("\r", "")).encode("utf-8")
# Path(self.filename).with_suffix(".rd").write_text(value.decode("utf-8"))
old_setattr(self, name, value)

Expand Down
2 changes: 1 addition & 1 deletion source/_extensions/redown.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def setup(app: Sphinx):
@(lambda breadcrumb: app.connect("source-read", breadcrumb))
def _(app, docname, content):
content[0] = redown(content[0])
Path(app.srcdir, docname).with_suffix(".rd").write_text(content[0])
# Path(app.srcdir, docname).with_suffix(".rd").write_text(content[0], encoding="utf8")

return {
"version": "builtin",
Expand Down

0 comments on commit cbf2c5b

Please sign in to comment.