From c310c335ff5cfdae0755dd8fa0cd6d5f53d427cc Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Wed, 25 Nov 2026 12:35:01 +0100 Subject: [PATCH] Upgrade click Since `click` v8.2, a `Group` invoked without a subcommand exits with status code 2 ("usage error") instead of 0. --- poetry.lock | 15 ++++++--------- pyproject.toml | 2 +- tests/console/test_main.py | 4 ++-- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/poetry.lock b/poetry.lock index 7f46344..a70b6dc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -682,19 +682,16 @@ files = [ [[package]] name = "click" -version = "8.1.8" +version = "8.5.1" description = "Composable command line interface toolkit" optional = false -python-versions = ">=3.7" +python-versions = ">=3.10" groups = ["main", "dev"] files = [ - {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, - {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, + {file = "click-8.5.1-py3-none-any.whl", hash = "sha256:8bb5376d2006950386f8c6427613334a2acadc5f559cb80e638d00b4df957e37"}, + {file = "click-8.5.1.tar.gz", hash = "sha256:9bbfada76703fd1d784b83eea012e3e8c6a001a876543ef104fa56aaaeb072b4"}, ] -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - [[package]] name = "colorama" version = "0.4.6" @@ -706,7 +703,7 @@ files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] -markers = {main = "extra == \"research\" and sys_platform == \"win32\" or platform_system == \"Windows\"", dev = "platform_system == \"Windows\" or sys_platform == \"win32\""} +markers = {main = "sys_platform == \"win32\" and extra == \"research\"", dev = "sys_platform == \"win32\" or platform_system == \"Windows\""} [[package]] name = "colorlog" @@ -5050,4 +5047,4 @@ research = ["jupyterlab", "numpy", "pytz"] [metadata] lock-version = "2.1" python-versions = ">=3.13,<4.0" -content-hash = "1b35da02710abc0388cd84fab3211add0f9efdcf1022d2fe60d54229148212d7" +content-hash = "0b46413f07dbf5aa69a50176d15d46ae8720a11c1e49c2abd9921800c1c18399" diff --git a/pyproject.toml b/pyproject.toml index 1af37ca..33eca41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ requires-python = ">=3.13,<4.0" dependencies = [ "Shapely>=1.7.1,<2.1", "alembic>=1.4.2", - "click>=7.1.2,<8.2", + "click>=7.1.2", "folium>=0.12.1,<0.19", "geopy>=2.1.0,<3", "googlemaps>=4.4.2,<5", diff --git a/tests/console/test_main.py b/tests/console/test_main.py index ba79ef9..bef0056 100644 --- a/tests/console/test_main.py +++ b/tests/console/test_main.py @@ -65,10 +65,10 @@ class TestCLIWithoutCommand: @pytest.mark.no_cover def test_no_options(self, cli): - """Exit with 0 status code and no output if run without options.""" + """Exit with 2 status code (usage error) if run without options.""" result = cli.invoke(main.entry_point) - assert result.exit_code == 0 + assert result.exit_code == 2 # The following test cases validate the --version / -V option.