Skip to content

Commit

Permalink
Apply formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Feb 4, 2024
1 parent d57f117 commit 7683185
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
11 changes: 7 additions & 4 deletions sphinx_autobuild/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions sphinx_autobuild/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 4 additions & 2 deletions sphinx_autobuild/ignore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit 7683185

Please sign in to comment.