Skip to content

Commit 3cdebe8

Browse files
Add py.typed to be compliant with PEP-561 again (#2752)
* Add py.typed and generate static __all__ * quality * compare ordered lists instead of sets * fix all list parsing
1 parent 31e0273 commit 3cdebe8

File tree

7 files changed

+528
-9
lines changed

7 files changed

+528
-9
lines changed

.github/workflows/python-quality.yml

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
- run: .venv/bin/python utils/check_contrib_list.py
4141
- run: .venv/bin/python utils/check_inference_input_params.py
4242
- run: .venv/bin/python utils/check_static_imports.py
43+
- run: .venv/bin/python utils/check_all_variable.py
4344
- run: .venv/bin/python utils/generate_async_inference_client.py
4445
- run: .venv/bin/python utils/generate_inference_types.py
4546
- run: .venv/bin/python utils/check_task_parameters.py

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
include src/huggingface_hub/templates/modelcard_template.md
22
include src/huggingface_hub/templates/datasetcard_template.md
3+
include src/huggingface_hub/py.typed

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ quality:
1010
python utils/check_inference_input_params.py
1111
python utils/check_contrib_list.py
1212
python utils/check_static_imports.py
13+
python utils/check_all_variable.py
1314
python utils/generate_async_inference_client.py
1415

1516
mypy src
@@ -19,6 +20,7 @@ style:
1920
ruff check --fix $(check_dirs) # linter
2021
python utils/check_contrib_list.py --update
2122
python utils/check_static_imports.py --update
23+
python utils/check_all_variable.py --update
2224
python utils/generate_async_inference_client.py --update
2325

2426
inference_check:

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,5 @@ def get_version() -> str:
138138
"Topic :: Scientific/Engineering :: Artificial Intelligence",
139139
],
140140
include_package_data=True,
141+
package_data={"huggingface_hub": ["py.typed"]}, # Needed for wheel installation
141142
)

0 commit comments

Comments
 (0)