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

✨ Add typing support to pyexasol #162

Open
5 tasks
Nicoretti opened this issue Dec 9, 2024 · 0 comments
Open
5 tasks

✨ Add typing support to pyexasol #162

Nicoretti opened this issue Dec 9, 2024 · 0 comments
Labels
feature Product feature

Comments

@Nicoretti
Copy link
Member

Summary

Add typing support to pyexasol by incorporating type hints and re-enabling type checking for all files and paths in the pyproject.toml in the [[tool.mypy.overrides]] section.

Details

This feature aims to enhance the static typing support of the pyexasol library. Type hints should be added to all relevant functions and methods within the codebase. Additionally, type checking should be re-enabled for all files and paths specified in the [[tool.mypy.overrides]] section of the pyproject.toml file.

Background & Context

Implementing type hints in the pyexasol codebase will lead to better developer experience and reduced runtime errors as types are checked statically. This improves code quality and maintainability. Moreover, enabling MyPy for all files and paths ensures that the typing system is comprehensively utilized, aligning with modern Python development best practices.

Examples

Here are some examples showing how type hints can be used:

Before:

def connect(dsn, user, password):
    # connection logic
    pass

After:

def connect(dsn: str, user: str, password: str) -> Connection:
    # connection logic
    pass

References

Task(s)

  • Add type hints to all relevant functions and methods in the codebase
  • Verify type hint correctness with MyPy
  • Update the pyproject.toml file to re-enable type checking for all files and paths in the [[tool.mypy.overrides]] section
  • Run MyPy to ensure all type checks pass
  • Update documentation to reflect the addition of type hints
@Nicoretti Nicoretti added the feature Product feature label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Product feature
Projects
None yet
Development

No branches or pull requests

1 participant