Code quality analysis: httpie/cli static recon findings — definition.py (956 lines), 17% doc coverage
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- python
- Domain
- cli, developer-experience
Research direction
Start with the ASS-ADE findings and the companion PR #1825, then inspect httpie/cli/definition.py, argtypes.py, options.py, and the listed output imports. The issue reports several possible refactors, documentation gaps, import cycles, and untested modules, but requests no specific change or completion criteria.
Written by the indexing model from the issue text.
Description
Overview
I ran ASS-ADE (pure static analysis, no LLM, < 2 seconds) on httpie and found a few things worth flagging. Opened a companion PR (#1825) with the full reports — sharing the findings here as an issue so they can be tracked and discussed independently of the PR.
Top findings
1. httpie/cli/definition.py — 956 lines, mixed responsibilities
This file combines:
- Constant/enum declarations (belongs in
constants.py) - Argument group builder functions (could be
groups.py) - Top-level
ParserSpeccomposition (the actual "definition")
At 956 lines, it's hard to navigate and test each responsibility in isolation. Splitting it into 2-3 files with a single responsibility each wouldn't change any public API.
2. Documentation coverage — 17%
Only 189 of 1,107 public callables have docstrings. The files with the most external call surface and no docs:
httpie/cli/argtypes.py(275 lines, type converters)httpie/cli/options.py(249 lines,ParserSpec/Qualifiers)
3. Circular imports in output/
Two import cycles detected:
client.py → context.py → output/utils.py(possible false positive — worth verifying)- Self-referential import in
output/formatters/xml.py
4. 66 untested modules
Most are in docs/, extras/, and tooling scripts — not the core library. The ratio for the core httpie/ package itself is better.
Recon summary
Files: 265 (135 source)
Circular deps: 2
Doc coverage: 17% (189/1107)
Untested modules: 66
Tier violations: 3 files spanning multiple layers
Tool
ASS-ADE — ass-ade recon <path>. Runs locally in about 1.5 seconds, no external calls. The full RECON_REPORT.md is in the companion PR.
No action required — just sharing in case any of this is useful for future work. Happy to run a follow-up analysis on a specific module if it would help.
- Dominant language
- Python
- Stars
- 38.6k
- Forks
- 4k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from httpie/cli
-
new
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug new
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100