From 8f419d4cbc3eab27bcf981db564a08d983345a22 Mon Sep 17 00:00:00 2001 From: Yusuke Miyazaki Date: Thu, 18 May 2023 21:08:08 +0900 Subject: [PATCH] Fix TypeError when running "tox -p" --- src/tox_gh_actions/plugin.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/tox_gh_actions/plugin.py b/src/tox_gh_actions/plugin.py index cb91c53..55aa354 100644 --- a/src/tox_gh_actions/plugin.py +++ b/src/tox_gh_actions/plugin.py @@ -205,12 +205,17 @@ def is_log_grouping_enabled(options: Parsed) -> bool: # As --parallel-live option doesn't seem to be working correctly, # this condition is more conservative compared to the plugin for tox 3. if hasattr(options, "parallel"): - if options.parallel > 0: - # Case for `tox p` or `tox -p ` - return False - elif options.parallel is None: + if options.parallel is None: # Case for `tox -p` return False + elif isinstance(options.parallel, int) and options.parallel > 0: + # Case for `tox p` or `tox -p ` + return False + logger.warning( + "tox-gh-actions couldn't understand the parallel option. " + "ignoring the given option: %s", + options.parallel, + ) return True