| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
- Export Row class from __init__.py so users can type hint with it - Extract decimal separator logic into decimal_config.py module - Auto-export SQL/GetInfo/AuthType constants from constants.py - Replace manual constant assignments in __init__.py with wildcard import
There was a problem hiding this comment.
This PR refactors mssql_python/__init__.py by: (1) exporting the Row class at the top level (addressing issue #270), (2) moving decimal separator logic to a new decimal_config.py module using a factory pattern, and (3) replacing manual, per-constant assignments with dynamic enum-driven exports and a wildcard import in __init__.py.
Changes:
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| mssql_python/decimal_config.py | New module providing factory-based decimal separator getter/setter functions |
| mssql_python/constants.py | Adds dynamic module-level constant exports for enums and get_info_constants() |
| mssql_python/__init__.py | Removes manual constant assignments; adds Row export; uses wildcard import from constants |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changes
Summary
📋 Files Needing Attention📉 Files with overall lowest coverage (click to expand)mssql_python.pybind.logger_bridge.hpp: 58.8%
mssql_python.pybind.logger_bridge.cpp: 59.2%
mssql_python.pybind.ddbc_bindings.h: 67.8%
mssql_python.pybind.ddbc_bindings.cpp: 69.7%
mssql_python.row.py: 70.5%
mssql_python.pybind.connection.connection.cpp: 75.3%
mssql_python.__init__.py: 77.1%
mssql_python.ddbc_bindings.py: 79.6%
mssql_python.pybind.connection.connection_pool.cpp: 79.6%
mssql_python.connection.py: 85.2%🔗 Quick Links
|
Sorry, something went wrong.
- Remove AuthType individual member exports to avoid namespace pollution - Add test_row_export to verify Row class is properly exported - Add test_get_info_constants to cover constants.py:530 - Add test_decimal_config_import_error_fallback for ImportError branch - Remove unused Dict import from __init__.py - Remove unreachable dead code in decimal_config.py - Add pragma: no cover to TYPE_CHECKING guard
There was a problem hiding this comment.
Approved with minor changes
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Work Item / Issue Reference
Summary
This pull request refactors how module-level constants and decimal separator configuration are handled in the mssql_python package. Constants are now dynamically exported from the constants module, and decimal separator functions are moved to a dedicated module for improved maintainability and clarity. The changes also add new exports for row objects and simplify imports.
Module-level constant export and API improvements:
Decimal separator configuration refactor:
API and import enhancements:
These changes improve the maintainability, clarity, and usability of the package's public API and configuration options.