Skip to content

Commit

Permalink
fix PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
juanburgosautoglb committed Feb 8, 2024
1 parent d5f8cde commit 6ae0e2f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions shotgun_api3/shotgun.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ class ClientCapabilities(object):
:ivar str platform: The current client platform. Valid values are ``mac``, ``linux``,
``windows``, or ``None`` (if the current platform couldn't be determined).
:ivar str local_path_field: ThePTRfield used for local file paths. This is calculated using
:ivar str local_path_field: The PTR field used for local file paths. This is calculated using
the value of ``platform``. Ex. ``local_path_mac``.
:ivar str py_version: Simple version of Python executable as a string. Eg. ``2.7``.
:ivar str ssl_version: Version of OpenSSL installed. Eg. ``OpenSSL 1.0.2g 1 Mar 2016``. This
Expand Down Expand Up @@ -3441,8 +3441,8 @@ def _call_rpc(self, method, params, include_auth_params=True, first=False):
except ProtocolError as e:
e.headers = resp_headers

# We've seen some rare instances ofPTRreturning 502 for issues that
# appear to be caused by something internal toPTR. We're going to
# We've seen some rare instances of PTR returning 502 for issues that
# appear to be caused by something internal to PTR. We're going to
# allow for limited retries for those specifically.
if attempt != max_attempts and e.errcode in [502, 504]:
LOG.debug("Got a 502 or 504 response. Waiting and retrying...")
Expand Down
2 changes: 1 addition & 1 deletion tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def _setup_mock(self, s3_status_code_error=503):
{"version": [2, 4, 0]})

def _mock_http(self, data, headers=None, status=None):
"""Setup a mock response from thePTRserver.
"""Setup a mock response from the PTR server.
Only has an affect if the server has been mocked.
"""
Expand Down
18 changes: 9 additions & 9 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1737,7 +1737,7 @@ def test_following(self):
'''Test following method'''

if not self.sg.server_caps.version or self.sg.server_caps.version < (7, 0, 12):
warnings.warn("Test bypassed becausePTRserver used does not support this feature.", FutureWarning)
warnings.warn("Test bypassed because PTR server used does not support this feature.", FutureWarning)
return

with self.gen_entity(
Expand Down Expand Up @@ -2607,7 +2607,7 @@ class TestReadAdditionalFilterPresets(base.LiveTestBase):

def test_simple_case(self):
if self.sg_version < (7, 0, 0):
warnings.warn("Test bypassed becausePTRserver used does not support this feature.", FutureWarning)
warnings.warn("Test bypassed because PTR server used does not support this feature.", FutureWarning)
return

filters = [
Expand All @@ -2626,7 +2626,7 @@ def test_simple_case(self):

def test_find_one(self):
if self.sg_version < (7, 0, 0):
warnings.warn("Test bypassed becausePTRserver used does not support this feature.", FutureWarning)
warnings.warn("Test bypassed because PTR server used does not support this feature.", FutureWarning)
return

filters = [
Expand All @@ -2644,7 +2644,7 @@ def test_find_one(self):

def test_filter_with_no_name(self):
if self.sg_version < (7, 0, 0):
warnings.warn("Test bypassed becausePTRserver used does not support this feature.", FutureWarning)
warnings.warn("Test bypassed because PTR server used does not support this feature.", FutureWarning)
return

filters = [
Expand All @@ -2662,7 +2662,7 @@ def test_filter_with_no_name(self):

def test_invalid_filter(self):
if self.sg_version < (7, 0, 0):
warnings.warn("Test bypassed becausePTRserver used does not support this feature.", FutureWarning)
warnings.warn("Test bypassed because PTR server used does not support this feature.", FutureWarning)
return

filters = [
Expand All @@ -2680,7 +2680,7 @@ def test_invalid_filter(self):

def test_filter_not_iterable(self):
if self.sg_version < (7, 0, 0):
warnings.warn("Test bypassed becausePTRserver used does not support this feature.", FutureWarning)
warnings.warn("Test bypassed because PTR server used does not support this feature.", FutureWarning)
return

filters = [
Expand All @@ -2698,7 +2698,7 @@ def test_filter_not_iterable(self):

def test_filter_not_list_of_iterable(self):
if self.sg_version < (7, 0, 0):
warnings.warn("Test bypassed becausePTRserver used does not support this feature.", FutureWarning)
warnings.warn("Test bypassed because PTR server used does not support this feature.", FutureWarning)
return

filters = [
Expand All @@ -2716,7 +2716,7 @@ def test_filter_not_list_of_iterable(self):

def test_multiple_latest_filters(self):
if self.sg_version < (7, 0, 0):
warnings.warn("Test bypassed becausePTRserver used does not support this feature.", FutureWarning)
warnings.warn("Test bypassed because PTR server used does not support this feature.", FutureWarning)
return

filters = [
Expand All @@ -2740,7 +2740,7 @@ def test_modify_visibility(self):
# If the version of Shotgun is too old, do not run this test.
# TODO: Update this with the real version number once the feature is released.
if self.sg_version < (8, 5, 0):
warnings.warn("Test bypassed becausePTRserver used does not support this feature.", FutureWarning)
warnings.warn("Test bypassed because PTR server used does not support this feature.", FutureWarning)
return

field_display_name = "Project Visibility Test"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def test_authorization(self):
self.assertEqual(expected, headers.get("Authorization"))

def test_localization_header_default(self):
"""Localization header not passed to server without explicitly settingPTRlocalization config to True"""
"""Localization header not passed to server without explicitly setting PTR localization config to True"""
self.sg.info()

args, _ = self.sg._http_request.call_args
Expand All @@ -254,7 +254,7 @@ def test_localization_header_default(self):
self.assertEqual(None, headers.get("locale"))

def test_localization_header_when_localized(self):
"""Localization header passed to server when settingPTRlocalization config to True"""
"""Localization header passed to server when setting PTR localization config to True"""
self.sg.config.localized = True

self.sg.info()
Expand Down
4 changes: 2 additions & 2 deletions tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def _check_url_with_urllib(self, url):
"""
Given a url it will perform a simple request and return a result.
"""
# create a request using the opener generated by thePTRAPI.
# create a request using the opener generated by the PTR API.
# The `_build_opener` method internally should use the correct certs.
opener = self.sg._build_opener(urllib.request.HTTPHandler)
request = urllib.request.Request(url)
Expand All @@ -460,7 +460,7 @@ def test_found_correct_cert(self):
# Call dirname to remove from __init__.py
os.path.join(os.path.dirname(api.__file__), "lib", "certifi", "cacert.pem")
)
# Now ensure that the path thePTRAPI has found is correct.
# Now ensure that the path the PTR API has found is correct.
self.assertEqual(cert_path, self.certs)
self.assertTrue(os.path.isfile(self.certs))

Expand Down

0 comments on commit 6ae0e2f

Please sign in to comment.