-
Notifications
You must be signed in to change notification settings - Fork 631
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* First draft to update tooling * Fixed __init__.py generation * quiet make quality * update pre-commit and contributing guide * set back mypy config * FIX test due to moon-landing wording update
- Loading branch information
Showing
81 changed files
with
890 additions
and
2,123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,3 +132,6 @@ dmypy.json | |
.idea/ | ||
|
||
.DS_Store | ||
|
||
# Ruff | ||
.ruff_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
[tool.black] | ||
line-length = 88 | ||
line-length = 119 | ||
target_version = ['py37', 'py38', 'py39', 'py310'] | ||
preview = true | ||
|
||
[tool.mypy] | ||
ignore_missing_imports = true | ||
no_implicit_optional = true | ||
scripts_are_modules = true | ||
scripts_are_modules = true | ||
|
||
[tool.ruff] | ||
# Ignored rules: | ||
# "E501" -> line length violation | ||
# "F821" -> undefined named in type annotation (e.g. Literal["something"]) | ||
ignore = ["E501", "F821"] | ||
select = ["E", "F", "I", "W"] | ||
line-length = 119 | ||
|
||
[tool.ruff.isort] | ||
lines-after-imports = 2 | ||
known-first-party = ["huggingface_hub"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,6 @@ def get_version() -> str: | |
extras["tensorflow"] = ["tensorflow", "pydot", "graphviz"] | ||
|
||
extras["testing"] = extras["cli"] + [ | ||
"isort>=5.5.4", | ||
"jedi", | ||
"Jinja2", | ||
"pytest", | ||
|
@@ -64,10 +63,8 @@ def get_version() -> str: | |
] | ||
|
||
extras["quality"] = [ | ||
"black==22.3", | ||
"flake8>=3.8.3", | ||
"flake8-bugbear", | ||
"isort>=5.5.4", | ||
"black~=23.1", | ||
"ruff>=0.0.241", | ||
"mypy==0.982", | ||
] | ||
|
||
|
@@ -81,26 +78,16 @@ def get_version() -> str: | |
version=get_version(), | ||
author="Hugging Face, Inc.", | ||
author_email="[email protected]", | ||
description=( | ||
"Client library to download and publish models, datasets and other repos on the" | ||
" huggingface.co hub" | ||
), | ||
description="Client library to download and publish models, datasets and other repos on the huggingface.co hub", | ||
long_description=open("README.md", "r", encoding="utf-8").read(), | ||
long_description_content_type="text/markdown", | ||
keywords=( | ||
"model-hub machine-learning models natural-language-processing deep-learning" | ||
" pytorch pretrained-models" | ||
), | ||
keywords="model-hub machine-learning models natural-language-processing deep-learning pytorch pretrained-models", | ||
license="Apache", | ||
url="https://github.com/huggingface/huggingface_hub", | ||
package_dir={"": "src"}, | ||
packages=find_packages("src"), | ||
extras_require=extras, | ||
entry_points={ | ||
"console_scripts": [ | ||
"huggingface-cli=huggingface_hub.commands.huggingface_cli:main" | ||
] | ||
}, | ||
entry_points={"console_scripts": ["huggingface-cli=huggingface_hub.commands.huggingface_cli:main"]}, | ||
python_requires=">=3.7.0", | ||
install_requires=install_requires, | ||
classifiers=[ | ||
|
Oops, something went wrong.