Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding DictConfig #498

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Adding DictConfig #498

wants to merge 7 commits into from

Commits on Sep 28, 2024

  1. Add configurable retry parameters with DictConfig

    Introduce a DictConfig class to manage default retry parameters in a singleton dictionary. Enhances flexibility by allowing default configurations to be overridden or extended when calling the retry decorator.
    SalvatoreZagaria committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    622bea5 View commit details
    Browse the repository at this point in the history
  2. Refactor and add new method for configuration handling

    Remove redundant attribute check in __init__ method and simplify its initialization. Add a new `get` method to access configuration values more explicitly and efficiently.
    SalvatoreZagaria committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    25efec0 View commit details
    Browse the repository at this point in the history
  3. Add unit tests for tenacity's default configurations

    This commit introduces a new test class `TestRetryDefaults` to verify `dict_config` functionalities within tenacity. Included tests cover setting, getting, overriding, and deleting configuration attributes, as well as testing retry behavior with default and overridden configurations.
    SalvatoreZagaria committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    58b9993 View commit details
    Browse the repository at this point in the history
  4. Refactor code formatting for better readability

    Reformatted function calls and comments across `tests/test_tenacity.py` and `tenacity/config.py` for consistent indentation and alignment. This improves the code's readability and maintainability.
    SalvatoreZagaria committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    506a573 View commit details
    Browse the repository at this point in the history
  5. Add configurable retry parameters and unit tests

    Introduced the `DictConfig` class to manage default retry parameters in a singleton dictionary. Refactored initialization methods, adding a new `get` method for better configuration access. Included a new test class `TestRetryDefaults` to verify `dict_config` functionalities.
    SalvatoreZagaria committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    8329735 View commit details
    Browse the repository at this point in the history
  6. Simplify release notes format for retry parameters.

    Converted multi-line entries in release notes to single-line with quotes. This improves readability and maintains consistency across the document. Reduced redundancy in formatting for a cleaner output.
    SalvatoreZagaria committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    93e5427 View commit details
    Browse the repository at this point in the history
  7. Refactor tenacity/config.py to add type annotations

    Updated the singleton implementation and added type annotations to various methods and attributes in the DictConfig class. This improves code readability and helps with static type checking.
    SalvatoreZagaria committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    cbd7d3f View commit details
    Browse the repository at this point in the history