Closed khardsonhurley closed 7 years ago
Do you know why those Travis checks are failing? I tried to run the tests on my machine and also had issues (for example when I tried to run user_test.py I got an import error, even after running python setup.py install
). Am I missing something @gmjosack ?
Take a look at https://travis-ci.org/dropbox/pygerduty/jobs/236195360#L170
It's failing because flake8 has errors/warnings
The requester.execute_request
is still tightly reliant on the Pagerduty
class. Ideally the methods in the events
module would not need to live on a class at all, let alone inherit from the Pagerduty
class which is specific to the REST api. You should be able to pull the opener
stuff to live with the request code and pull out the json logic into its own abstraction.
When you recommended pulling the opener stuff, were you referencing this:
try:
response = (pagerduty.opener.open(request, timeout=pagerduty.timeout).read().decode("utf-8"))
from the execute_request method? Are you suggesting to move it into the Pagerduty class when you say You should be able to pull the opener stuff to live with the request code
?
Travis is complaining about this:
pygerduty/v2.py:522:17: E128 continuation line under-indented for visual indent
But I believe this was something from the original __init__.py
file, would you prefer that I leave it or change to quiet the failure?
You just need to add a space on line 522 to align proxies with self. Looks like that changed when you updated the attributes passed to init.
@gmjosack in this diff you will see the following changes:
Format Changes
__init__.py
into v2.py to allow for second version of the library.V1-> V2 Changes
https://api.pagerduty.com/
. (line 538)Changes to come
requester_id
and moving this to the header of the request.