Skip to content
Merged
1 change: 1 addition & 0 deletions sdk/core/azure-core/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
### Bug fixes

- Fixed a bug that sends None as request_id #9545
- Enable mypy for customers #9572

## 1.2.1 (2020-01-14)

Expand Down
1 change: 1 addition & 0 deletions sdk/core/azure-core/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ include *.md
include azure/__init__.py
recursive-include samples *.py *.md
recursive-include doc *.rst
include azure/core/py.typed

Empty file.
4 changes: 4 additions & 0 deletions sdk/core/azure-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
setup(
name=PACKAGE_NAME,
version=version,
include_package_data=True,
description='Microsoft Azure {} Library for Python'.format(PACKAGE_PPRINT_NAME),
long_description=readme + '\n\n' + history,
long_description_content_type='text/markdown',
Expand All @@ -61,6 +62,9 @@
# Exclude packages that will be covered by PEP420 or nspkg
'azure',
]),
package_data={
'pytyped': ['py.typed'],
},
install_requires=[
'requests>=2.18.4',
'six>=1.6',
Expand Down
3 changes: 2 additions & 1 deletion sdk/eventhub/azure-eventhub/azure/eventhub/_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ def _create_auth(self):
the session.
"""
try:
token_type = self._credential.token_type
# ignore mypy's warning because token_type is Optional
token_type = self._credential.token_type # type: ignore
except AttributeError:
token_type = b"jwt"
if token_type == b"servicebus.windows.net:sastoken":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ async def _create_auth_async(self) -> authentication.JWTTokenAsync:

"""
try:
token_type = self._credential.token_type
# ignore mypy's warning because token_type is Optional
token_type = self._credential.token_type # type: ignore
except AttributeError:
token_type = b"jwt"
if token_type == b"servicebus.windows.net:sastoken":
Expand Down