Skip to content

Commit

Permalink
Fix typos (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
kianmeng committed Mar 11, 2022
1 parent 96d4a41 commit f5b857b
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
10 changes: 5 additions & 5 deletions README.rst
Expand Up @@ -115,7 +115,7 @@ Thanks to ivanst0 for the contribution

- XML mode can now be enabled even if the given Model has no XML metadata #184
- Add Kerberos Authentication #186
- Improve error message if expected type is dictionnary and something else is provided #188
- Improve error message if expected type is dictionary and something else is provided #188

**Bugfixes**

Expand Down Expand Up @@ -212,7 +212,7 @@ Thanks to eduardomourar for the contribution

**Bugfixes**

- Remove unecessary verbose "warnings" log #126
- Remove unnecessary verbose "warnings" log #126

2018-10-02 Version 0.6.0
++++++++++++++++++++++++
Expand Down Expand Up @@ -311,7 +311,7 @@ Thanks to dharmab for the contribution
**Disclaimer**

This released is designed to be backward compatible with 0.4.x, but there is too many internal refactoring
and new features to continue with 0.4.x versionning
and new features to continue with 0.4.x versioning

**Features**

Expand Down Expand Up @@ -484,13 +484,13 @@ This make Authentication classes more consistent:
- OAuthTokenAuthentication is now a subclass of BasicTokenAuthentication (was Authentication)
- BasicTokenAuthentication has now a "set_token" methods that does nothing.

This allows test like "isintance(o, BasicTokenAuthentication)" to be guaranted that the following attributes exists:
This allows test like "isintance(o, BasicTokenAuthentication)" to be guaranteed that the following attributes exists:

- token
- set_token()
- signed_session()

This means for users of "msrestazure", that they are guaranted that all AD classes somehow inherits from "BasicTokenAuthentication"
This means for users of "msrestazure", that they are guaranteed that all AD classes somehow inherits from "BasicTokenAuthentication"

2017-10-05 Version 0.4.16
+++++++++++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion msrest/paging.py
Expand Up @@ -117,7 +117,7 @@ def advance_page(self):
# type: () -> List[Model]
"""Force moving the cursor to the next azure call.
This method is for advanced usage, iterator protocol is prefered.
This method is for advanced usage, iterator protocol is preferred.
:raises: StopIteration if no further page
:return: The current page list
Expand Down
4 changes: 2 additions & 2 deletions msrest/pipeline/__init__.py
Expand Up @@ -114,7 +114,7 @@ def on_response(self, request, response, **kwargs):

def on_exception(self, request, **kwargs):
# type: (Request[HTTPRequestType], Any) -> bool
"""Is executed if an exception comes back fron the following
"""Is executed if an exception comes back from the following
policy.
Return True if the exception has been handled and should not
Expand Down Expand Up @@ -246,7 +246,7 @@ class Response(Generic[HTTPRequestType, HTTPResponseType]):
The Response interface exposes an HTTP response object as it returns through the pipeline of Policy objects.
This ensures that Policy objects have access to the HTTP response.
This also have a "context" dictionnary where policy can put additional fields.
This also have a "context" dictionary where policy can put additional fields.
Policy SHOULD update the "context" dictionary with additional post-processed field if they create them.
However, nothing prevents a policy to actually sub-class this class a return it instead of the initial instance.
"""
Expand Down
4 changes: 2 additions & 2 deletions msrest/serialization.py
Expand Up @@ -271,7 +271,7 @@ def serialize(self, keep_readonly=False, **kwargs):
def as_dict(self, keep_readonly=True, key_transformer=attribute_transformer, **kwargs):
"""Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Advanced usage might optionally use a callback as parameter:
.. code::python
Expand Down Expand Up @@ -1710,7 +1710,7 @@ def deserialize_object(self, attr, **kwargs):
raise TypeError(error + str(obj_type))

def deserialize_basic(self, attr, data_type):
"""Deserialize baisc builtin data type from string.
"""Deserialize basic builtin data type from string.
Will attempt to convert to str, int, float and bool.
This function will also accept '1', '0', 'true' and 'false' as
valid bool values.
Expand Down
4 changes: 2 additions & 2 deletions msrest/universal_http/__init__.py
Expand Up @@ -317,7 +317,7 @@ class HTTPClientResponse(object):
No body is defined here on purpose, since async pipeline
will provide async ways to access the body
You have two differents types of body:
You have two different types of body:
- Full in-memory using "body" as bytes
"""
def __init__(self, request, internal_response):
Expand All @@ -344,7 +344,7 @@ def text(self, encoding=None):
return self.body().decode(encoding or "utf-8-sig")

def raise_for_status(self):
"""Raise for status. Should be overriden, but basic implementation provided.
"""Raise for status. Should be overridden, but basic implementation provided.
"""
if self.status_code >= 400:
raise ClientRequestError("Received status code {}".format(self.status_code))
Expand Down
4 changes: 2 additions & 2 deletions msrest/universal_http/requests.py
Expand Up @@ -263,7 +263,7 @@ def _configure_send(self, request, **kwargs):
requests_kwargs['proxies'] = proxies

# Replace by operation level kwargs
# We allow some of them, since some like stream or json are controled by msrest
# We allow some of them, since some like stream or json are controlled by msrest
for key in kwargs:
if key in self._REQUESTS_KWARGS:
requests_kwargs[key] = kwargs[key]
Expand Down Expand Up @@ -378,7 +378,7 @@ def retries(self, value):
@property
def backoff_factor(self):
# type: () -> Union[int, float]
"""Factor by which back-off delay is incementally increased."""
"""Factor by which back-off delay is incrementally increased."""
return self.policy.backoff_factor

@backoff_factor.setter
Expand Down
10 changes: 5 additions & 5 deletions tests/test_serialization.py
Expand Up @@ -1358,7 +1358,7 @@ def __init__(self, name=None, additional_properties=None):
self.assertEqual(serialized, expected_message)

def test_long_as_type_object(self):
"""Test irrelevant on Python 3. But still doing it to test regresssion.
"""Test irrelevant on Python 3. But still doing it to test regression.
https://github.com/Azure/msrest-for-python/pull/121
"""

Expand All @@ -1380,7 +1380,7 @@ class TestModel(Model):
}

def test_unicode_as_type_object(self):
"""Test irrelevant on Python 3. But still doing it to test regresssion.
"""Test irrelevant on Python 3. But still doing it to test regression.
https://github.com/Azure/msrest-for-python/issue/221
"""

Expand Down Expand Up @@ -1516,10 +1516,10 @@ def assert_model(inst):
assert_model(model_instance)

def test_twice_key_scenario(self):
# Te reproduce the initial bug, you need a attribute named after the last part
# To reproduce the initial bug, you need a attribute named after the last part
# of a flattening JSON from another attribute (here type)
# https://github.com/Azure/azure-sdk-for-python/issues/11422
# Issue happend where searching for "type2", since we found a match in both "type2" and "type" keys
# Issue happened where searching for "type2", since we found a match in both "type2" and "type" keys

class LocalModel(Model):
_attribute_map = {
Expand Down Expand Up @@ -2517,7 +2517,7 @@ class TestEnum2(Enum):
self.assertEqual(obj.abc, TestEnum.val)

def test_long_as_type_object(self):
"""Test irrelevant on Python 3. But still doing it to test regresssion.
"""Test irrelevant on Python 3. But still doing it to test regression.
https://github.com/Azure/msrest-for-python/pull/121
"""

Expand Down
4 changes: 2 additions & 2 deletions tests/test_xml_serialization.py
Expand Up @@ -698,7 +698,7 @@ class XmlModel(Model):
assert xml_content == b"<?xml version='1.0' encoding='utf8'?>\n<Message><MessageText>message1\xe3\x9a\x88</MessageText></Message>"

@pytest.mark.skipif(sys.version_info < (3,6),
reason="Dict ordering not guaranted before 3.6, makes this complicated to test.")
reason="Dict ordering not guaranteed before 3.6, makes this complicated to test.")
def test_add_prop(self):
"""Test addProp as a dict.
"""
Expand Down Expand Up @@ -1155,7 +1155,7 @@ class XmlModel(Model):


@pytest.mark.skipif(sys.version_info < (3,6),
reason="Dict ordering not guaranted before 3.6, makes this complicated to test.")
reason="Dict ordering not guaranteed before 3.6, makes this complicated to test.")
def test_add_prop_is_xml(self):
"""Test addProp as a dict.
"""
Expand Down

0 comments on commit f5b857b

Please sign in to comment.