Merge branch '8.0.x'
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Lord · committed by David Lord · parents e8e4b32, 3e88d3d · Browse files · 9 files·+73 added−58 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
9 files+73 added−58 removed
- tests:+10 added−2 removed
- other:+63 added−56 removed
Provenance
- Commit
655918a- Tree
16ab8bf- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent 1
e8e4b32- Parent 2
3e88d3d
9 files changed+73 added−58 removed
modified:docs/conf.py+1 added-1 removed
36 unmodified lines37 ProjectLink("Donate", "https://palletsprojects.com/donate"),38 ProjectLink("PyPI Releases", "https://pypi.org/project/click/"),39 ProjectLink("Source Code", "https://github.com/pallets/click/"),40 ProjectLink("Issue Tracker", "https://github.com/pallets/click/issues/"),41- ProjectLink("Website", "https://palletsprojects.com/"),41+ ProjectLink("Website", "https://palletsprojects.com/p/click"),42 ProjectLink("Twitter", "https://twitter.com/PalletsTeam"),43 ProjectLink("Chat", "https://discord.gg/pallets"),44 ]45 }14 unmodified linesmodified:requirements/dev.txt+34 added-31 removed
4 unmodified lines5 # pip-compile requirements/dev.in6 #7 alabaster==0.7.128 # via sphinx9-appdirs==1.4.410- # via virtualenv9 attrs==21.2.010 # via pytest11 babel==2.9.112 # via sphinx13+backports.entry-points-selectable==1.1.014+ # via virtualenv15-certifi==2020.12.515+certifi==2021.5.3016 # via requests17-cfgv==3.3.017+cfgv==3.3.118 # via pre-commit19-chardet==4.0.019+charset-normalizer==2.0.620 # via requests21 click==8.0.122 # via pip-tools23-distlib==0.3.123+distlib==0.3.324 # via virtualenv25 docutils==0.1626 # via27 # sphinx28 # sphinx-tabs29-filelock==3.0.1229+filelock==3.3.030 # via31 # tox32 # virtualenv33-identify==2.2.433+identify==2.3.034 # via pre-commit35-idna==2.1035+idna==3.236 # via requests37 imagesize==1.2.038 # via sphinx39 iniconfig==1.1.140 # via pytest41-jinja2==3.0.141+jinja2==3.0.242 # via sphinx43 markupsafe==2.0.144 # via jinja245-mypy==0.91046- # via -r requirements/typing.in45 mypy-extensions==0.4.346 # via mypy47+mypy==0.91048+ # via -r requirements/typing.in49 nodeenv==1.6.050 # via pre-commit51-packaging==20.951+packaging==21.052 # via53 # pallets-sphinx-themes54 # pytest55 # sphinx56 # tox57 pallets-sphinx-themes==2.0.158 # via -r requirements/docs.in59-pep517==0.10.059+pep517==0.11.060 # via pip-tools61-pip-tools==6.2.061+pip-tools==6.3.062 # via -r requirements/dev.in63-pluggy==0.13.163+platformdirs==2.4.064+ # via virtualenv65+pluggy==1.0.066 # via67 # pytest68 # tox67-pre-commit==2.14.169+pre-commit==2.15.070 # via -r requirements/dev.in71 py==1.10.072 # via73 # pytest74 # tox73-pygments==2.9.075+pygments==2.10.076 # via77 # sphinx78 # sphinx-tabs79 pyparsing==2.4.780 # via packaging81 pytest==6.2.582 # via -r requirements/tests.in81-pytz==2021.183+pytz==2021.384 # via babel85 pyyaml==5.4.186 # via pre-commit85-requests==2.25.187+requests==2.26.088 # via sphinx89 six==1.16.090 # via91 # tox92 # virtualenv93 snowballstemmer==2.1.094 # via sphinx93-sphinx==4.1.295+sphinx-issues==1.2.096+ # via -r requirements/docs.in97+sphinx-tabs==3.2.098+ # via -r requirements/docs.in99+sphinx==4.2.0100 # via101 # -r requirements/docs.in102 # pallets-sphinx-themes103 # sphinx-issues104 # sphinx-tabs105 # sphinxcontrib-log-cabinet100-sphinx-issues==1.2.0101- # via -r requirements/docs.in102-sphinx-tabs==3.2.0103- # via -r requirements/docs.in106 sphinxcontrib-applehelp==1.0.2107 # via sphinx108 sphinxcontrib-devhelp==1.0.2109 # via sphinx9 unmodified lines119 # via sphinx120 toml==0.10.2121 # via122 # mypy121- # pep517123 # pre-commit124 # pytest125 # tox126+tomli==1.2.1127+ # via pep517125-tox==3.24.3128+tox==3.24.4129 # via -r requirements/dev.in127-typing-extensions==3.10.0.0130+typing-extensions==3.10.0.2131 # via mypy129-urllib3==1.26.5132+urllib3==1.26.7133 # via requests131-virtualenv==20.4.6134+virtualenv==20.8.1135 # via136 # pre-commit137 # tox135-wheel==0.36.2138+wheel==0.37.0139 # via pip-tools140 141 # The following packages are considered to be unsafe in a requirements file:142 # pip1 unmodified linemodified:requirements/docs.txt+14 added-14 removed
6 unmodified lines7 alabaster==0.7.128 # via sphinx9 babel==2.9.110 # via sphinx11-certifi==2020.12.511+certifi==2021.5.3012 # via requests13-chardet==4.0.013+charset-normalizer==2.0.614 # via requests15 docutils==0.1616 # via17 # sphinx18 # sphinx-tabs19-idna==2.1019+idna==3.220 # via requests21 imagesize==1.2.022 # via sphinx23-jinja2==3.0.123+jinja2==3.0.224 # via sphinx25 markupsafe==2.0.126 # via jinja227-packaging==20.927+packaging==21.028 # via29 # pallets-sphinx-themes30 # sphinx31 pallets-sphinx-themes==2.0.132 # via -r requirements/docs.in33-pygments==2.9.033+pygments==2.10.034 # via35 # sphinx36 # sphinx-tabs37 pyparsing==2.4.738 # via packaging39-pytz==2021.139+pytz==2021.340 # via babel41-requests==2.25.141+requests==2.26.042 # via sphinx43 snowballstemmer==2.1.044 # via sphinx45-sphinx==4.1.245+sphinx-issues==1.2.046+ # via -r requirements/docs.in47+sphinx-tabs==3.2.048+ # via -r requirements/docs.in49+sphinx==4.2.050 # via51 # -r requirements/docs.in52 # pallets-sphinx-themes53 # sphinx-issues54 # sphinx-tabs55 # sphinxcontrib-log-cabinet52-sphinx-issues==1.2.053- # via -r requirements/docs.in54-sphinx-tabs==3.2.055- # via -r requirements/docs.in56 sphinxcontrib-applehelp==1.0.257 # via sphinx58 sphinxcontrib-devhelp==1.0.259 # via sphinx6 unmodified lines66 sphinxcontrib-qthelp==1.0.367 # via sphinx68 sphinxcontrib-serializinghtml==1.1.569 # via sphinx70-urllib3==1.26.570+urllib3==1.26.771 # via requests72 73 # The following packages are considered to be unsafe in a requirements file:74 # setuptoolsmodified:requirements/tests.txt+2 added-2 removed
6 unmodified lines7 attrs==21.2.08 # via pytest9 iniconfig==1.1.110 # via pytest11-packaging==20.911+packaging==21.012 # via pytest13-pluggy==0.13.113+pluggy==1.0.014 # via pytest15 py==1.10.016 # via pytest17 pyparsing==2.4.75 unmodified linesmodified:requirements/typing.txt+3 added-3 removed
2 unmodified lines3 # To update, run:4 #5 # pip-compile requirements/typing.in6 #7-mypy==0.9108- # via -r requirements/typing.in7 mypy-extensions==0.4.38 # via mypy9+mypy==0.91010+ # via -r requirements/typing.in11 toml==0.10.212 # via mypy13-typing-extensions==3.10.0.013+typing-extensions==3.10.0.214 # via mypymodified:src/click/termui.py+3 added-3 removed
82 unmodified lines83 text: str,84 default: t.Optional[t.Any] = None,85 hide_input: bool = False,86 confirmation_prompt: t.Union[bool, str] = False,87- type: t.Optional[ParamType] = None,87+ type: t.Optional[t.Union[ParamType, t.Any]] = None,88 value_proc: t.Optional[t.Callable[[str], t.Any]] = None,89 prompt_suffix: str = ": ",90 show_default: bool = True,91 err: bool = False,503 unmodified lines595 bits.append(f"\033[{2 if dim else 22}m")596 if underline is not None:597 bits.append(f"\033[{4 if underline else 24}m")598 if overline is not None:599- bits.append(f"\033[{53 if underline else 55}m")599+ bits.append(f"\033[{53 if overline else 55}m")600 if italic is not None:601- bits.append(f"\033[{5 if underline else 23}m")601+ bits.append(f"\033[{3 if italic else 23}m")602 if blink is not None:603 bits.append(f"\033[{5 if blink else 25}m")604 if reverse is not None:605 bits.append(f"\033[{7 if reverse else 27}m")202 unmodified linesmodified:tests/test_utils.py+10 added-2 removed
65 unmodified lines66 ({"bg": (135, 0, 175)}, "\x1b[48;2;135;0;175mx y\x1b[0m"),67 ({"bold": True}, "\x1b[1mx y\x1b[0m"),68 ({"dim": True}, "\x1b[2mx y\x1b[0m"),69 ({"underline": True}, "\x1b[4mx y\x1b[0m"),70- ({"overline": True}, "\x1b[55mx y\x1b[0m"),71- ({"italic": True}, "\x1b[23mx y\x1b[0m"),70+ ({"overline": True}, "\x1b[53mx y\x1b[0m"),71+ ({"italic": True}, "\x1b[3mx y\x1b[0m"),72 ({"blink": True}, "\x1b[5mx y\x1b[0m"),73 ({"reverse": True}, "\x1b[7mx y\x1b[0m"),74 ({"strikethrough": True}, "\x1b[9mx y\x1b[0m"),75+ ({"bold": False}, "\x1b[22mx y\x1b[0m"),76+ ({"dim": False}, "\x1b[22mx y\x1b[0m"),77+ ({"underline": False}, "\x1b[24mx y\x1b[0m"),78+ ({"overline": False}, "\x1b[55mx y\x1b[0m"),79+ ({"italic": False}, "\x1b[23mx y\x1b[0m"),80+ ({"blink": False}, "\x1b[25mx y\x1b[0m"),81+ ({"reverse": False}, "\x1b[27mx y\x1b[0m"),82+ ({"strikethrough": False}, "\x1b[29mx y\x1b[0m"),83 ({"fg": "black", "reset": False}, "\x1b[30mx y"),84 ],85 )86 def test_styling(styles, ref):404 unmodified linesmodified:.pre-commit-config.yaml+2 added-2 removed
1234556789101112131415151617181911 unmodified linesci: autoupdate_schedule: monthlyrepos: - repo: https://github.com/asottile/pyupgrade rev: v2.25.0 rev: v2.29.0 hooks: - id: pyupgrade args: ["--py36-plus"] - repo: https://github.com/asottile/reorder_python_imports rev: v2.6.0 hooks: - id: reorder-python-imports args: ["--application-directories", "src"] - repo: https://github.com/psf/black rev: 21.8b0 rev: 21.9b0 hooks: - id: black - repo: https://github.com/PyCQA/flake8 rev: 3.9.211 unmodified linesmodified:CHANGES.rst+4 added
23 unmodified lines24 - ``Path`` type with ``resolve_path=True`` resolves relative symlinks25 to be relative to the containing directory. :issue:`1921`26 - Completion does not skip Python's resource cleanup when exiting,27 avoiding some unexpected warning output. :issue:`1738, 2017`28+- Fix type annotation for ``type`` argument in ``prompt`` function.29+ :issue:`2062`30+- Fix overline and italic styles, which were incorrectly added when31+ adding underline. :pr:`2058`32 33 34 Version 8.0.135 -------------889 unmodified lines