Skip to content

Added docstrings to all public api's#2

Merged
sn merged 1 commit into
mainfrom
feature/doctring-enhancements
Apr 17, 2026
Merged

Added docstrings to all public api's#2
sn merged 1 commit into
mainfrom
feature/doctring-enhancements

Conversation

@sn
Copy link
Copy Markdown
Contributor

@sn sn commented Apr 17, 2026

This pull request significantly improves the documentation, clarity, and usability of the core API for the nitro_validator package. The changes add comprehensive docstrings, usage examples, and type annotations to all major classes and methods, making the library much more approachable for both new and experienced users. No functional logic is changed, but the API is now much better documented and easier to understand.

The most important changes are:

Documentation and Usability Improvements

  • Added detailed docstrings, usage examples, and clarified argument/return types for all core classes and methods in nitro_validator/core/validator.py, core/rule.py, core/rule_registry.py, and core/exceptions.py. This includes clear explanations of how to use the validator, how to register rules, and how to handle validation errors. [1] [2] [3] [4]

  • Enhanced the docstring for the top-level NitroValidator class in __init__.py to explain its purpose, default behavior, and provide usage examples.

Type Annotations and API Consistency

  • Added or improved type annotations for all public methods and constructors, making the API more robust and type-safe. [1] [2] [3] [4]

Versioning

  • Bumped the package version from 1.0.2 to 1.0.3 in __init__.py to reflect these improvements.

Minor Code Cleanups

  • Refined and clarified the __repr__ method in NitroValidationRule for better debugging output.

These changes do not affect runtime behavior but greatly improve the developer experience and maintainability of the codebase.

@sn sn self-assigned this Apr 17, 2026
@sn sn merged commit e99fc87 into main Apr 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant