switch to pyproject.toml (#2438)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Lord · committed by GitHub · parents cba52fa, 742a552 · Browse files · 7 files·+93 added−118 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
7 files+93 added−118 removed
- tests:+1 added−1 removed
- other:+92 added−117 removed
Provenance
- Commit
347529d- Tree
9d8e4e3- Author
David Lord <davidism@gmail.com>- Committer
GitHub <noreply@github.com>- Parent 1
cba52fa- Parent 2
742a552
7 files changed+93 added−118 removed
modified:.github/workflows/tests.yaml+1 added-1 removed
48 unmodified lines49505152535354555648 unmodified lines - name: cache mypy uses: actions/cache@v3 with: path: ./.mypy_cache key: mypy|${{ matrix.python }}|${{ hashFiles('setup.cfg') }} key: mypy|${{ matrix.python }}|${{ hashFiles('pyproject.toml') }} if: matrix.tox == 'typing' - run: pip install tox - run: tox run -e ${{ matrix.tox }}modified:tests/test_utils.py+1 added-1 removed
455 unmodified lines456 user = os.path.expanduser("~")457 assert user in click.utils._expand_args(["~"])458 monkeypatch.setenv("CLICK_TEST", "hello")459 assert "hello" in click.utils._expand_args(["$CLICK_TEST"])460- assert "setup.cfg" in click.utils._expand_args(["*.cfg"])460+ assert "pyproject.toml" in click.utils._expand_args(["*.toml"])461 assert os.path.join("docs", "conf.py") in click.utils._expand_args(["**/conf.py"])462 assert "*.not-found" in click.utils._expand_args(["*.not-found"])463 # a bad glob pattern, such as a pytest identifier, should return itself464 assert click.utils._expand_args(["test.py::test_bad"])[0] == "test.py::test_bad"36 unmodified linesadded:.flake8+25 added
1+[flake8]2+extend-select =3+ # bugbear4+ B5+ # bugbear opinions6+ B97+ # implicit str concat8+ ISC9+extend-ignore =10+ # slice notation whitespace, invalid11+ E20312+ # line length, handled by bugbear B95013+ E50114+ # bare except, handled by bugbear B00115+ E72216+ # zip with strict=, requires python >= 3.1017+ B90518+ # string formatting opinion, B028 renamed to B90719+ B02820+ B90721+# up to 88 allowed by bugbear B95022+max-line-length = 8023+per-file-ignores =24+ # __init__ exports names25+ src/click/__init__.py: F401modified:CHANGES.rst+3 added
3 unmodified lines4 -------------5 6 Unreleased7 8+- Use modern packaging metadata with ``pyproject.toml`` instead of ``setup.cfg``.9+ :pr:`326`10 11+12 Version 8.1.413 -------------14 15 Unreleased1047 unmodified linesadded:pyproject.toml+63 added
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263[project]name = "click"description = "Composable command line interface toolkit"readme = "README.rst"license = {text = "BSD-3-Clause"}maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}]authors = [{name = "Armin Ronacher", email = "armin.ronacher@active-4.com"}]classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python",]requires-python = ">=3.7"dependencies = [ "colorama; platform_system == 'Windows'", "importlib-metadata; python_version < '3.8'",]dynamic = ["version"]
[project.urls]Donate = "https://palletsprojects.com/donate"Documentation = "https://click.palletsprojects.com/"Changes = "https://click.palletsprojects.com/changes/""Source Code" = "https://github.com/pallets/click/""Issue Tracker" = "https://github.com/pallets/click/issues/"Twitter = "https://twitter.com/PalletsTeam"Chat = "https://discord.gg/pallets"
[build-system]requires = ["setuptools"]build-backend = "setuptools.build_meta"
[tool.setuptools.dynamic]version = {attr = "click.__version__"}
[tool.pytest.ini_options]testpaths = ["tests"]filterwarnings = ["error"]
[tool.coverage.run]branch = truesource = ["click", "tests"]
[tool.coverage.paths]source = ["src", "*/site-packages"]
[tool.mypy]python_version = "3.7"files = ["src/click"]show_error_codes = truepretty = truestrict = truelocal_partial_types = truewarn_unreachable = true
[[tool.mypy.overrides]]module = [ "colorama.*", "importlib_metadata.*"]ignore_missing_imports = truedeleted:setup.cfg-107 removed
1-[metadata]2-name = click3-version = attr: click.__version__4-url = https://palletsprojects.com/p/click/5-project_urls =6- Donate = https://palletsprojects.com/donate7- Documentation = https://click.palletsprojects.com/8- Changes = https://click.palletsprojects.com/changes/9- Source Code = https://github.com/pallets/click/10- Issue Tracker = https://github.com/pallets/click/issues/11- Twitter = https://twitter.com/PalletsTeam12- Chat = https://discord.gg/pallets13-license = BSD-3-Clause14-license_files = LICENSE.rst15-author = Armin Ronacher16-author_email = armin.ronacher@active-4.com17-maintainer = Pallets18-maintainer_email = contact@palletsprojects.com19-description = Composable command line interface toolkit20-long_description = file: README.rst21-long_description_content_type = text/x-rst22-classifiers =23- Development Status :: 5 - Production/Stable24- Intended Audience :: Developers25- License :: OSI Approved :: BSD License26- Operating System :: OS Independent27- Programming Language :: Python28-29-[options]30-packages = find:31-package_dir = = src32-include_package_data = True33-python_requires = >= 3.734-# Dependencies are in setup.py for GitHub's dependency graph.35-36-[options.packages.find]37-where = src38-39-[tool:pytest]40-testpaths = tests41-filterwarnings =42- error43-44-[coverage:run]45-branch = True46-source =47- click48- tests49-50-[coverage:paths]51-source =52- src53- */site-packages54-55-[flake8]56-# B = bugbear57-# E = pycodestyle errors58-# F = flake8 pyflakes59-# W = pycodestyle warnings60-# B9 = bugbear opinions61-# ISC = implicit str concat62-select = B, E, F, W, B9, ISC63-ignore =64- # slice notation whitespace, invalid65- E20366- # line length, handled by bugbear B95067- E50168- # bare except, handled by bugbear B00169- E72270- # bin op line break, invalid71- W50372- # zip with strict=, requires python >= 3.1073- B90574- # string formatting opinion, B028 renamed to B90775- B02876- B90777-# up to 88 allowed by bugbear B95078-max-line-length = 8079-per-file-ignores =80- # __init__ exports names81- src/click/__init__.py: F40182-83-[mypy]84-files = src/click85-python_version = 3.786-show_error_codes = True87-disallow_subclassing_any = True88-disallow_untyped_calls = True89-disallow_untyped_defs = True90-disallow_incomplete_defs = True91-disallow_any_generics = True92-check_untyped_defs = True93-no_implicit_optional = True94-local_partial_types = True95-no_implicit_reexport = True96-strict_equality = True97-warn_redundant_casts = True98-warn_unused_configs = True99-warn_unused_ignores = True100-warn_return_any = True101-warn_unreachable = True102-103-[mypy-colorama.*]104-ignore_missing_imports = True105-106-[mypy-importlib_metadata.*]107-ignore_missing_imports = Truedeleted:setup.py-9 removed
1-from setuptools import setup2-3-setup(4- name="click",5- install_requires=[6- "colorama; platform_system == 'Windows'",7- "importlib-metadata; python_version < '3.8'",8- ],9-)