66import sys
77import tempfile
88from contextlib import suppress
9- from functools import wraps
109from io import StringIO
1110from pathlib import Path
1211from typing import List , Optional , Pattern
@@ -168,32 +167,7 @@ def safety(): # noqa: WPS430
168167 ctx .run (safety , title = "Checking dependencies" )
169168
170169
171- def no_docs_py36 (nofail = True ):
172- """
173- Decorate a duty that builds docs to warn that it's not possible on Python 3.6.
174-
175- Arguments:
176- nofail: Whether to fail or not.
177-
178- Returns:
179- The decorated function.
180- """
181-
182- def decorator (func ):
183- @wraps (func )
184- def wrapper (ctx ):
185- if sys .version_info <= (3 , 7 , 0 ):
186- ctx .run (["false" ], title = "Docs can't be built on Python 3.6" , nofail = nofail , quiet = True )
187- else :
188- func (ctx )
189-
190- return wrapper
191-
192- return decorator
193-
194-
195170@duty
196- @no_docs_py36 ()
197171def check_docs (ctx ):
198172 """
199173 Check if the documentation builds correctly.
@@ -281,7 +255,6 @@ def clean(ctx):
281255
282256
283257@duty
284- @no_docs_py36 (nofail = False )
285258def docs (ctx ):
286259 """
287260 Build the documentation locally.
@@ -293,7 +266,6 @@ def docs(ctx):
293266
294267
295268@duty
296- @no_docs_py36 (nofail = False )
297269def docs_serve (ctx , host = "127.0.0.1" , port = 8000 ):
298270 """
299271 Serve the documentation (localhost:8000).
@@ -307,7 +279,6 @@ def docs_serve(ctx, host="127.0.0.1", port=8000):
307279
308280
309281@duty
310- @no_docs_py36 (nofail = False )
311282def docs_deploy (ctx ):
312283 """
313284 Deploy the documentation on GitHub pages.
0 commit comments