Conversation
- Changed Python version from 3.9 to 3.10 to support pattern matching syntax in pytest. - Added per-module options to disable arg-type errors for test files that use dict unpacking with TableSpec.
kaapstorm
commented
Jan 6, 2026
|
|
||
| iterator = RepeatableIterator(lambda: (i for i in [])) | ||
| empty_list: list[int] = [] | ||
| iterator = RepeatableIterator(lambda: (i for i in empty_list)) |
Contributor
Author
There was a problem hiding this comment.
Ignoring this also seemed like a good option, but "empty_list" felt nicely explicit.
Missing imports: - Added logging import to commcare_export/excel_query.py. - Added explicit imports for test files (jsonpath, defaultdict, split_leftmost, etc.). - Added __all__ to commcare_export/__init__.py to explicitly export __version__. Type annotations: - Added type annotations for variables where mypy couldn't infer types: mappings, sheets_by_source, emits, depth, paginators. - Updated generic types to include parameters: list[Any], dict[str, int], etc. Property override issues: - Removed message = None from base DataExportException class and added it as a property. - Removed max_column_length from base TableWriter class (defined in subclasses). - Added type annotations to BaseCommand attributes to allow both str and None. Other fixes: - Changed unknown_count from string 'unknown' to int -1 in commcare_hq_client.py. - Fixed tuple reassignment issue in misc.py by using a different variable name. - Added null check for archive.close() in writers.py. - Changed TableSpec.rows from Iterable[List[Any]] to List[List[Any]] to support mutation. - Converted map() result to list() in minilinq.py. - Added assertions for non-None values in utils_cli.py. - Used CaseInsensitiveDict in test_commcare_hq_client.py. - Added type ignore comments for SQLAlchemy and setuptools compatibility.
Contributor
Author
|
Never mind. I'll come back to this some other time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes the GitHub "test" workflow to check typing in all files instead of just two.
Resolves all typing issues encountered.
No changes to functionality.
🐡