Skip to content
This repository was archived by the owner on Jan 4, 2025. It is now read-only.

Compatibility fix #2#125

Closed
lakam99 wants to merge 1 commit intopython-amazon-mws:masterfrom
lakam99:patch-2
Closed

Compatibility fix #2#125
lakam99 wants to merge 1 commit intopython-amazon-mws:masterfrom
lakam99:patch-2

Conversation

@lakam99
Copy link
Copy Markdown
Contributor

@lakam99 lakam99 commented Jul 12, 2019

if v returns ValueError when not passing in default python iterable type. Using any() provides cross iterable object compatibility.

if v returns ValueError when not passing in default python iterable type. Using any() provides cross iterable object compatibility.
@lakam99 lakam99 changed the title Compatibility fix Compatibility fix #2 Jul 12, 2019
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 12, 2019

Codecov Report

Merging #125 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #125   +/-   ##
=======================================
  Coverage   46.67%   46.67%           
=======================================
  Files           4        4           
  Lines         632      632           
  Branches       64       64           
=======================================
  Hits          295      295           
- Misses        322      324    +2     
+ Partials       15       13    -2
Impacted Files Coverage Δ
mws/mws.py 44.6% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ccef002...226e996. Read the comment docs.

@elcolumbio
Copy link
Copy Markdown
Contributor

elcolumbio commented Jul 22, 2019

Thanks. I refactored this together with the help of @GriceTurrble #65, also we have good test coverage for this part.
This is bugged for Values like 0 or False. See the open #106.
If i get you right, you think we should also remove empty iterables?

If i remember correct the value should never be any type of a python iterable. See the next line where we check this:

if isinstance(value, (dict, list, set, tuple)):
            message = 'expected string or datetime datatype, got {},'\
                'for key {} and value {}'.format(
                    type(value), key, str(value))
            raise MWSError(message)

First i thought i should test with duck typing but this is clearer.
So if you have an example where we have to stringify an iterable you could show us.

@lakam99 lakam99 closed this Jul 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants