Skip to content

Conversation

@thatguysimon
Copy link
Contributor

@thatguysimon thatguysimon commented Oct 17, 2020

Adds a wrapper around the include-wip-pacts-since attribute in the CLI

@thatguysimon thatguysimon changed the title feat(verifier): Support include-wip-pacts-since in CLI feat(verifier): Support work-in-progress pacts attribute in CLI Oct 17, 2020
@thatguysimon
Copy link
Contributor Author

Hi @elliottmurray,
Currently the build is failing due to flake8's:

./pact/verify_wrapper.py:132:5: C901 'VerifyWrapper.call_verify' is too complex (11)

I guess the new condition I added was one too many for flake8.

Is there a particular way you would like me to solve this?

One quick way that I can think of to make the function less complex is to extract the following piece into a separate "validation" function:

if(len(pacts) == 0 and not self._broker_present(**kwargs)):
    raise PactException('Pact urls or Pact broker required')

@elliottmurray
Copy link
Contributor

I think something like that is acceptable. I probably need to revisit that method at some point or exclude it from flake as I've hit this a bunch of times. But for your PR that is totally fine

@thatguysimon
Copy link
Contributor Author

Done.
Let me know if there's anything else I should change in the PR @elliottmurray

@elliottmurray
Copy link
Contributor

That's great - I'll do a release later or tomorrow. Thanks

@elliottmurray elliottmurray merged commit 4c68fd4 into pact-foundation:master Oct 17, 2020
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.

2 participants