You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-31Lines changed: 50 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,8 @@ Install modern development tools with Ruff replacing Black, isort, and Flake8:
117
117
pip install \
118
118
ruff \
119
119
mypy \
120
+
typer \
121
+
"click==8.1.8"\ # Pin click to 8.1.8 as a workaround for Typer (see note)
120
122
pytest pytest-cov pytest-asyncio \
121
123
pre-commit \
122
124
pip-tools \
@@ -131,6 +133,10 @@ pip install \
131
133
docformatter \
132
134
types-requests types-setuptools
133
135
```
136
+
Note on Typer/Click Versioning:
137
+
As of May 2025, Typer (e.g., version 0.15.3+) has a known incompatibility with Click versions 8.2.0 and higher. This can lead to TypeErrors during help message generation (e.g., Parameter.make_metavar() missing 1 required positional argument: 'ctx') or when Click tries to format error messages. This issue has been observed on Python 3.11+ including Python 3.13.
138
+
139
+
A common workaround, as discussed in the Typer community (e.g., GitHub issue #1215 for fastapi/typer), is to pin the click dependency to a version known to be compatible, such as click==8.1.8. Keep an eye on Typer's release notes for official fixes and updated Click compatibility (e.g., related to Typer PRs #1145, #1218).
134
140
135
141
## Step 5: Configure Tools via `pyproject.toml`
136
142
@@ -152,20 +158,30 @@ readme = "README.md"
152
158
requires-python = ">=3.10"
153
159
dependencies = [
154
160
# Add your project dependencies here
161
+
# If Typer is a direct dependency of your project itself, add it here too:
162
+
# "typer>=0.15.3", # Or your target Typer version
163
+
# "click==8.1.8", # And the pinned Click version
155
164
]
156
165
157
166
[project.optional-dependencies]
158
167
dev = [
159
-
"ruff>=0.2.0",
160
-
"mypy>=1.7.0",
161
-
"pytest>=7.4.0",
162
-
"pytest-cov>=4.1.0",
163
-
"pytest-asyncio>=0.21.0",
164
-
"pre-commit>=3.6.0",
165
-
"pip-tools>=7.3.0",
166
-
"commitizen>=3.13.0",
167
-
"bandit>=1.7.6",
168
-
"safety>=2.4.0",
168
+
"ruff>=0.2.0", # Linter/Formatter
169
+
"mypy>=1.7.0", # Static Type Checker
170
+
"typer>=0.15.3", # For CLIs (using your current version or a target one)
171
+
"click==8.1.8", # Pinned version for Typer compatibility
172
+
"pytest>=7.4.0", # Testing framework
173
+
"pytest-cov>=4.1.0", # Test coverage
174
+
"pytest-asyncio>=0.21.0", # For testing async code with pytest
175
+
"pre-commit>=3.6.0", # Git hooks manager
176
+
"pip-tools>=7.3.0", # For dependency management (compiling requirements)
177
+
"commitizen>=3.13.0", # For conventional commits
178
+
"bandit>=1.7.6", # Security linter
179
+
"safety>=2.4.0", # Checks for vulnerable dependencies
180
+
"prettier", # Optional: if you still use it for non-Python files
181
+
"autopep8", # Optional: if used for specific cases not covered by Ruff
182
+
"docformatter", # Optional: if Ruff's docstring formatting isn't sufficient
183
+
"types-requests", # Example: Stubs for type checking requests library
184
+
"types-setuptools", # Example: Stubs for type checking setuptools
169
185
]
170
186
171
187
# --- Tool Configurations ---
@@ -249,7 +265,7 @@ convention = "google" # Use Google style docstrings
249
265
"__init__.py" = ["F401"] # Allow unused imports in __init__.py
250
266
251
267
[tool.mypy]
252
-
python_version = "3.10"
268
+
python_version = "3.10"# Or your target Python version
253
269
warn_return_any = true
254
270
warn_unused_configs = true
255
271
disallow_untyped_defs = true
@@ -264,7 +280,7 @@ strict_equality = true
264
280
pretty = true
265
281
show_column_numbers = true
266
282
show_error_codes = true
267
-
ignore_missing_imports = true
283
+
ignore_missing_imports = true# Can be helpful initially
0 commit comments