From 76831852bc4c7f44ea36811294bb08850fd705ab Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Sun, 4 Feb 2024 05:43:40 +0000 Subject: [PATCH] Apply formatting --- sphinx_autobuild/__main__.py | 11 +++++++---- sphinx_autobuild/build.py | 1 + sphinx_autobuild/ignore.py | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/sphinx_autobuild/__main__.py b/sphinx_autobuild/__main__.py index bc60629..82150f5 100644 --- a/sphinx_autobuild/__main__.py +++ b/sphinx_autobuild/__main__.py @@ -42,8 +42,9 @@ def main(): pre_build_commands=pre_build_commands, ) - ignore_handler = _get_ignore_handler(args.ignore, args.re_ignore, outdir, - args.warnings_file, args.doctree_dir) + ignore_handler = _get_ignore_handler( + args.ignore, args.re_ignore, outdir, args.warnings_file, args.doctree_dir + ) server.watch(srcdir, builder, ignore=ignore_handler) for dirpath in args.additional_watched_dirs: dirpath = os.path.realpath(dirpath) @@ -54,7 +55,9 @@ def main(): builder() if args.openbrowser is True: - server.serve(port=port_num, host=args.host, root=outdir, open_url_delay=args.delay) + server.serve( + port=port_num, host=args.host, root=outdir, open_url_delay=args.delay + ) else: server.serve(port=port_num, host=args.host, root=outdir) @@ -112,7 +115,7 @@ def _get_parser(): def _add_autobuild_arguments(parser): - group = parser.add_argument_group('autobuild options') + group = parser.add_argument_group("autobuild options") group.add_argument( "--port", type=int, diff --git a/sphinx_autobuild/build.py b/sphinx_autobuild/build.py index 3055b7c..2f4ee1f 100644 --- a/sphinx_autobuild/build.py +++ b/sphinx_autobuild/build.py @@ -4,6 +4,7 @@ import subprocess from colorama import Fore, Style + # This isn't public API, but we want to avoid a subprocess call from sphinx.cmd.build import build_main diff --git a/sphinx_autobuild/ignore.py b/sphinx_autobuild/ignore.py index 10a9594..cdbdf2a 100644 --- a/sphinx_autobuild/ignore.py +++ b/sphinx_autobuild/ignore.py @@ -12,8 +12,10 @@ def __init__(self, regular, regex_based): self.regex_based_patterns = list(map(re.compile, regex_based)) def __repr__(self): - return (f"Ignore(regular={self.regular_patterns!r}, " - f"regex_based={self.regex_based_patterns!r})") + return ( + f"Ignore(regular={self.regular_patterns!r}, " + f"regex_based={self.regex_based_patterns!r})" + ) def __call__(self, path): """Determine if 'path' should be ignored."""