Repository navigation
Modernize - phase 4 - types update - #106
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request modernizes type annotations across the bbconf codebase as part of a phased modernization effort. It updates all type hints to use Python 3.10+ syntax, replacing typing.Union with the pipe operator (|) and using built-in generic types (list, dict) instead of their typing module equivalents.
Changes:
- Updated all type annotations to modern Python 3.10+ syntax (Union → |, List → list, Dict → dict, Optional → | None)
- Fixed bug in UsageModel where type annotations were incorrectly used as default values
- Replaced print statements with proper logging calls (_LOGGER.info/error)
- Applied SQLAlchemy best practices using .is_(False) instead of == False for boolean comparisons
- Added missing return type annotations and parameter type annotations
- Removed unused imports and unnecessary f-string prefixes
- Minor code cleanup (blank lines, import ordering)
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| bbconf/models/drs_models.py | Updated DRS model type annotations to modern syntax |
| bbconf/models/bedset_models.py | Updated bedset model type annotations to modern syntax |
| bbconf/models/bed_models.py | Updated bed model type annotations to modern syntax |
| bbconf/models/base_models.py | Updated base model type annotations; fixed UsageModel default value bug |
| bbconf/db_utils.py | Updated function signature type annotations; kept Optional for SQLAlchemy Mapped types |
| bbconf/config_parser/models.py | Updated config model type annotations to modern syntax |
| bbconf/config_parser/bedbaseconfig.py | Updated type annotations, added BaseClient import, removed unnecessary f-strings |
| bbconf/config_parser/utils.py | Replaced print with _LOGGER calls, removed BedBaseConfError wrapper |
| bbconf/modules/objects.py | Updated type annotations, added missing return type annotation |
| bbconf/modules/bedsets.py | Updated type annotations, removed blank lines |
| bbconf/modules/bedfiles.py | Updated type annotations, applied .is_(False) pattern, replaced print with logging, added deletion success log |
| bbconf/bbagent.py | Updated type annotations, added return type for get_list_assays |
| bbconf/init.py | Added blank line for PEP 8 compliance |
| pyproject.toml | Added manual_testing.py to ruff exclude list |
| tests/conftest.py | Removed unused imports (subprocess, register) |
| tests/test_common.py | Removed unused BedBaseConfError import |
| tests/test_bedfile.py | Removed unnecessary blank line |
| tests/test_universes.py | Removed unnecessary blank line |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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:
TODO:
__version__.pyfile