refactor: unify exception handling, add ISO 8601 time, dedup commands, expand tests
- Replace _error_code_for_message() string matching with error_code attribute on exception classes - Add error_code to all TwitterError subclasses (AuthenticationError, RateLimitError, etc.) - Add InvalidInputError exception class - TwitterAPIError derives error_code from HTTP status code automatically - auth.py: use AuthenticationError instead of RuntimeError - cli.py: catch (TwitterError, RuntimeError) for backward compat - Extract _fetch_and_display_users() to deduplicate followers/following commands - Add format_iso8601() to timeutil.py - Add createdAtISO field to tweet and user profile serialization - New test files: test_output.py, test_cache.py, test_timeutil.py - Expand test_filter.py (topN, score mode, custom weights, empty input) - Tests: 152 → 194 unit tests, all passing
This commit is contained in:
7
twitter_cli/commands/__init__.py
Normal file
7
twitter_cli/commands/__init__.py
Normal file
@@ -0,0 +1,7 @@
|
||||
"""CLI command sub-modules for twitter-cli.
|
||||
|
||||
Commands are split into three groups:
|
||||
- read: feed, bookmarks, search, tweet, article, show, list, favorites
|
||||
- write: post, reply, quote, delete, like/unlike, retweet/unretweet, bookmark/unbookmark
|
||||
- user: user, user-posts, likes, followers, following, whoami, status, follow/unfollow
|
||||
"""
|
||||
Reference in New Issue
Block a user