Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nacho/fix black #4

Merged
merged 3 commits into from
Oct 10, 2023
Merged

Nacho/fix black #4

merged 3 commits into from
Oct 10, 2023

Conversation

nachovizzo
Copy link

@nachovizzo nachovizzo commented Oct 10, 2023

This partially solves the following error:

would reformat arri_tower_controller/launch/arri_tower_controller.launch.py
All done! ✨ 🍰 ✨
1 file would be reformatted, 1 file would be left unchanged.
Traceback (most recent call last):
  File "/home/richard/.local/bin/ament_black", line 8, in <module>
    sys.exit(main())
  File "/home/richard/.local/lib/python3.10/site-packages/ament_black/main.py", line 98, in main
    black(black_args)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/richard/.local/lib/python3.10/site-packages/black/__init__.py", line 488, in main
    reformat_many(
  File "/home/richard/.local/lib/python3.10/site-packages/black/__init__.py", line 699, in reformat_many
    loop.run_until_complete(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 624, in run_until_complete
    self._check_closed()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 515, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
sys:1: RuntimeWarning: coroutine 'schedule_formatting' was never awaited

I mean partially, because I haven't fixed the error per se, but fixed other stuff. Like trying to guess the python files and, passing over only the files that need to be reformatted, to avoid spitting many threads

EDIT This c49507c does fix the multi threading issue as well

@nachovizzo nachovizzo merged commit 00ce47c into main Oct 10, 2023
3 checks passed
@nachovizzo nachovizzo deleted the nacho/fix_black branch October 11, 2023 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant