This repository was archived by the owner on Jul 16, 2025. It is now read-only.
Cast multiple=True args in upload to list#104
Merged
giovanni-guidini merged 1 commit intomasterfrom Mar 10, 2023
Merged
Conversation
Recently when trying out the CLI with the new upload endpoint I tried to use the `--exclude` option but got the following error:
```
File "/Users/giovannimguidini/Projects/GitHub/codecov-cli/codecov_cli/services/upload/coverage_file_finder.py", line 179, in find_coverage_files
default_folders_to_ignore + self.folders_to_ignore,
TypeError: can only concatenate list (not "tuple") to list
```
Investigating it deeper we try to merge 2 lists, with one of them being actually a tuple indeed:
```
default_folders_to_ignore has type <class 'list'>
self.folders_to_ignore has type <class 'tuple'>
```
Click documentation doesn't specify if the default cliss for options with `multiple=True` is `tuple` or `list`, nor did I find a click type for it. So instead I'm just casting the argument passed by click to be sure. I changed the default so it would still work if we don't use those options.
dana-yaish
approved these changes
Mar 10, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recently when trying out the CLI with the new upload endpoint I tried to use the
--excludeoption but got the following error:Investigating it deeper we try to merge 2 lists, with one of them being actually a tuple indeed:
Click documentation doesn't specify if the default cliss for options with
multiple=Trueistupleorlist, nor did I find a click type for it. So instead I'm just casting the argument passed by click to be sure. I changed the default so it would still work if we don't use those options.