Skip to content
This repository was archived by the owner on Jun 17, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions alpaca_trade_api/polygon/py.typed
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Refer to PEP 561 for purpose of this file.
# https://www.python.org/dev/peps/pep-0561/
2 changes: 2 additions & 0 deletions alpaca_trade_api/py.typed
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Refer to PEP 561 for purpose of this file.
# https://www.python.org/dev/peps/pep-0561/
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
'alpaca_trade_api',
'alpaca_trade_api.polygon',
],
package_data={
'alpaca_trade_api': ['py.typed'],
'alpaca_trade_api.polygon': ['py.typed'],

@haxdds haxdds Nov 18, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi blane-Nelson, thanks for contributing!

Why have you added a py.typed file for alpaca_trade_api.polygon package? What is the purpose?

@blane-nelson blane-nelson Jan 7, 2022

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file lets utilities (like MyPy) know that the package is using the new typing library. The files doesn't need to contain anything, it just has to be present in the package's root folder. Refer to the PEP 561 - https://www.python.org/dev/peps/pep-0561/ on python.org for a full explanation.

},
install_requires=REQUIREMENTS,
tests_require=REQUIREMENTS_TEST,
setup_requires=['pytest-runner', 'flake8'],
Expand Down