Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita6a666d

Browse files
authored
Account for skipped builds inbuild_docs() (#261)
1 parent77a363b commita6a666d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎build_docs.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,15 +536,15 @@ def includes_html(self):
536536
"""Does the build we are running include HTML output?"""
537537
returnself.select_output!="no-html"
538538

539-
defrun(self,http:urllib3.PoolManager)->bool:
539+
defrun(self,http:urllib3.PoolManager)->bool|None:
540540
"""Build and publish a Python doc, for a language, and a version."""
541541
start_time=perf_counter()
542542
start_timestamp=dt.datetime.now(tz=dt.UTC).replace(microsecond=0)
543543
logging.info("Running.")
544544
try:
545545
ifself.language.html_onlyandnotself.includes_html:
546546
logging.info("Skipping non-HTML build (language is HTML-only).")
547-
returnTrue
547+
returnNone# skipped
548548
self.cpython_repo.switch(self.version.branch_or_tag)
549549
ifself.language.tag!="en":
550550
self.clone_translation()
@@ -557,6 +557,8 @@ def run(self, http: urllib3.PoolManager) -> bool:
557557
build_duration=perf_counter()-start_time,
558558
trigger=trigger_reason,
559559
)
560+
else:
561+
returnNone# skipped
560562
exceptExceptionaserr:
561563
logging.exception("Badly handled exception, human, please help.")
562564
ifsentry_sdk:
@@ -1073,7 +1075,7 @@ def build_docs(args: argparse.Namespace) -> bool:
10731075
built_successfully=builder.run(http)
10741076
ifbuilt_successfully:
10751077
build_succeeded.add((version.name,language.tag))
1076-
else:
1078+
elifbuilt_successfullyisnotNone:
10771079
build_failed.add((version.name,language.tag))
10781080

10791081
logging.root.handlers[0].setFormatter(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp