Skip to content

Commit

Permalink
Fix ament_black for new get_sources API
Browse files Browse the repository at this point in the history
  • Loading branch information
bjsowa committed Apr 29, 2024
1 parent febe275 commit aaead0e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ament_black/ament_black/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@
from xml.sax.saxutils import escape
from xml.sax.saxutils import quoteattr

from black import get_sources
from black import get_sources, find_project_root
from black import main as black
from black import re_compile_maybe_verbose
from black.concurrency import maybe_install_uvloop
from black.const import DEFAULT_EXCLUDES
from black.const import DEFAULT_INCLUDES
from black.report import Report
import click
from unidiff import PatchSet


Expand Down Expand Up @@ -79,7 +78,7 @@ def main(argv=sys.argv[1:]):

# TODO(Nacho): Inject the config file results into the ctx (use read_pyproject_toml)
sources = get_sources(
ctx=click.Context(black),
root=find_project_root(tuple(args.paths))[0],
src=tuple(args.paths),
quiet=True,
verbose=False,
Expand Down

0 comments on commit aaead0e

Please sign in to comment.