diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a26817700..bbd964517 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,7 +2,7 @@ version: 2 updates: - package-ecosystem: "pip" directory: "/requirements" - target-branch: "3.0.x" + target-branch: "8.0.x" versioning-strategy: "lockfile-only" schedule: interval: "monthly" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eb5535123..609fdb90b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,8 +1,9 @@ ci: + autoupdate_branch: "8.0.x" autoupdate_schedule: monthly repos: - repo: https://github.com/asottile/pyupgrade - rev: v2.29.1 + rev: v2.31.0 hooks: - id: pyupgrade args: ["--py36-plus"] diff --git a/CHANGES.rst b/CHANGES.rst index 3eb5fad4a..72dd56838 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -14,6 +14,7 @@ Unreleased - Fix a typo in the Bash completion script that affected file and directory completion. If this script was generated by a previous version, it should be regenerated. :issue:`2163` +- Fix typing for ``secho`` file argument. :issue:`2174` - Fix shell completion for option values that start with non- alphanumeric characters. :issue:`2040` diff --git a/requirements/dev.txt b/requirements/dev.txt index 6dbcdf000..f2fd68cb7 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -6,17 +6,15 @@ # alabaster==0.7.12 # via sphinx -attrs==21.2.0 +attrs==21.4.0 # via pytest babel==2.9.1 # via sphinx -backports.entry-points-selectable==1.1.1 - # via virtualenv certifi==2021.10.8 # via requests cfgv==3.3.1 # via pre-commit -charset-normalizer==2.0.9 +charset-normalizer==2.0.10 # via requests click==8.0.3 # via pip-tools @@ -30,7 +28,7 @@ filelock==3.4.2 # via # tox # virtualenv -identify==2.4.0 +identify==2.4.3 # via pre-commit idna==3.3 # via requests @@ -42,7 +40,7 @@ jinja2==3.0.3 # via sphinx markupsafe==2.0.1 # via jinja2 -mypy==0.930 +mypy==0.931 # via -r requirements/typing.in mypy-extensions==0.4.3 # via mypy @@ -72,7 +70,7 @@ py==1.11.0 # via # pytest # tox -pygments==2.10.0 +pygments==2.11.2 # via # sphinx # sphinx-tabs @@ -84,7 +82,7 @@ pytz==2021.3 # via babel pyyaml==6.0 # via pre-commit -requests==2.26.0 +requests==2.27.1 # via sphinx six==1.16.0 # via @@ -99,7 +97,7 @@ sphinx==4.3.2 # sphinx-issues # sphinx-tabs # sphinxcontrib-log-cabinet -sphinx-issues==1.2.0 +sphinx-issues==3.0.1 # via -r requirements/docs.in sphinx-tabs==3.2.0 # via -r requirements/docs.in @@ -126,13 +124,13 @@ tomli==2.0.0 # via # mypy # pep517 -tox==3.24.4 +tox==3.24.5 # via -r requirements/dev.in typing-extensions==4.0.1 # via mypy -urllib3==1.26.7 +urllib3==1.26.8 # via requests -virtualenv==20.10.0 +virtualenv==20.13.0 # via # pre-commit # tox diff --git a/requirements/docs.txt b/requirements/docs.txt index 1b51a429d..b6b291ef7 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -10,7 +10,7 @@ babel==2.9.1 # via sphinx certifi==2021.10.8 # via requests -charset-normalizer==2.0.9 +charset-normalizer==2.0.10 # via requests docutils==0.16 # via @@ -30,7 +30,7 @@ packaging==21.3 # sphinx pallets-sphinx-themes==2.0.2 # via -r requirements/docs.in -pygments==2.10.0 +pygments==2.11.2 # via # sphinx # sphinx-tabs @@ -38,7 +38,7 @@ pyparsing==3.0.6 # via packaging pytz==2021.3 # via babel -requests==2.26.0 +requests==2.27.1 # via sphinx snowballstemmer==2.2.0 # via sphinx @@ -49,7 +49,7 @@ sphinx==4.3.2 # sphinx-issues # sphinx-tabs # sphinxcontrib-log-cabinet -sphinx-issues==1.2.0 +sphinx-issues==3.0.1 # via -r requirements/docs.in sphinx-tabs==3.2.0 # via -r requirements/docs.in @@ -67,7 +67,7 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -urllib3==1.26.7 +urllib3==1.26.8 # via requests # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/tests.txt b/requirements/tests.txt index c272b152b..abd1c2497 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -4,7 +4,7 @@ # # pip-compile requirements/tests.in # -attrs==21.2.0 +attrs==21.4.0 # via pytest iniconfig==1.1.1 # via pytest diff --git a/requirements/typing.txt b/requirements/typing.txt index a674922f9..99380e405 100644 --- a/requirements/typing.txt +++ b/requirements/typing.txt @@ -4,7 +4,7 @@ # # pip-compile requirements/typing.in # -mypy==0.930 +mypy==0.931 # via -r requirements/typing.in mypy-extensions==0.4.3 # via mypy diff --git a/setup.cfg b/setup.cfg index 06474f823..47f7e5f57 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,7 +29,7 @@ classifiers = [options] packages = find: package_dir = = src -include_package_data = true +include_package_data = True python_requires = >= 3.6 # Dependencies are in setup.py for GitHub's dependency graph. @@ -42,14 +42,14 @@ filterwarnings = error [coverage:run] -branch = true +branch = True source = click tests [coverage:paths] source = - click + src */site-packages [flake8] @@ -57,7 +57,7 @@ source = # E = pycodestyle errors # F = flake8 pyflakes # W = pycodestyle warnings -# B9 = bugbear opinions, +# B9 = bugbear opinions # ISC = implicit str concat select = B, E, F, W, B9, ISC ignore = @@ -72,7 +72,7 @@ ignore = # up to 88 allowed by bugbear B950 max-line-length = 80 per-file-ignores = - # __init__ module exports names + # __init__ exports names src/click/__init__.py: F401 [mypy] diff --git a/src/click/termui.py b/src/click/termui.py index a7a8d03cb..07b5257cc 100644 --- a/src/click/termui.py +++ b/src/click/termui.py @@ -624,7 +624,7 @@ def unstyle(text: str) -> str: def secho( message: t.Optional[t.Any] = None, - file: t.Optional[t.IO] = None, + file: t.Optional[t.IO[t.AnyStr]] = None, nl: bool = True, err: bool = False, color: t.Optional[bool] = None, diff --git a/tox.ini b/tox.ini index d1e41409c..027538579 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py3{11,10,9,8,7,6},pypy37 + py3{11,10,9,8,7,6},pypy3{8,7} style typing docs