Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions leanblueprint/Packages/blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def make_lean_data() -> None:
n) == 'definition' for n in graph.ancestors(node).union({node}))

lean_decls_path = Path(document.userdata['working-dir']).parent/"lean_decls"
lean_decls_path.write_text("\n".join(document.userdata.get("lean_decls", [])))
lean_decls_path.write_text("\n".join(document.userdata.get("lean_decls", [])), encoding="utf-8")

document.addPostParseCallbacks(150, make_lean_data)

Expand Down Expand Up @@ -293,7 +293,7 @@ def make_legend() -> None:
"""
Extend the dependency graph legend defined by the depgraph plugin
by adding information specific to Lean blueprints. This is registered
as a post-parse callback to allow users to redefine colors and their
as a post-parse callback to allow users to redefine colors and their
descriptions.
"""
document.userdata['dep_graph']['legend'].extend([
Expand Down
4 changes: 2 additions & 2 deletions leanblueprint/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def parse_libs(self) -> List[str]:

def add_checkdecls(self) -> None:
"""see `super.add_checkdecls`"""
with self.path.open("a") as lf:
with self.path.open("a", encoding="utf-8") as lf:
lf.write('\nrequire checkdecls from git "https://github.com/PatrickMassot/checkdecls.git"')

def add_docgen(self) -> None:
Expand Down Expand Up @@ -440,7 +440,7 @@ def mk_pdf() -> None:
bbl_path = blueprint_root/"print"/"print.bbl"
if bbl_path.exists():
shutil.copy(bbl_path, blueprint_root/"src"/"web.bbl")

@cli.command()
def pdf() -> None:
"""
Expand Down