Skip to content

Commit

Permalink
Merge pull request #177 from ymyzk/fix-tox-p
Browse files Browse the repository at this point in the history
Fix TypeError when running "tox -p"
  • Loading branch information
ymyzk authored May 18, 2023
2 parents 357fd20 + 8f419d4 commit 83f89d1
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/tox_gh_actions/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <num>`
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 <num>`
return False
logger.warning(
"tox-gh-actions couldn't understand the parallel option. "
"ignoring the given option: %s",
options.parallel,
)

return True

Expand Down

0 comments on commit 83f89d1

Please sign in to comment.