Skip to content

Commit

Permalink
Enable automatic formatting for sphinx/ext/githubpages.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Dec 20, 2024
1 parent bc53ab7 commit 13d25d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ exclude = [
"sphinx/domains/python/_object.py",
"sphinx/domains/rst.py",
"sphinx/domains/std/__init__.py",
"sphinx/ext/githubpages.py",
"sphinx/ext/graphviz.py",
"sphinx/ext/ifconfig.py",
"sphinx/ext/imgconverter.py",
Expand Down
4 changes: 2 additions & 2 deletions sphinx/ext/githubpages.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def create_nojekyll_and_cname(app: Sphinx, env: BuildEnvironment) -> None:

domain = _get_domain_from_url(app.config.html_baseurl)
# Filter out GitHub Pages domains, as they do not require CNAME files.
if domain and not domain.endswith(".github.io"):
with open(cname_path, 'w', encoding="utf-8") as f:
if domain and not domain.endswith('.github.io'):
with open(cname_path, 'w', encoding='utf-8') as f:
# NOTE: don't write a trailing newline. The `CNAME` file that's
# auto-generated by the GitHub UI doesn't have one.
f.write(domain)
Expand Down

0 comments on commit 13d25d9

Please sign in to comment.