con / duct

A helper to run a command, capture stdout/stderr and details about running
MIT License
1 stars 1 forks source link

Convert module to a package directory with a `py.typed` file #102

Closed jwodder closed 2 weeks ago

jwodder commented 2 weeks ago

The module needs to be converted to a package directory so that it can contain a py.typed file, which is necessary so that mypy can type-check uses of duct items in the test code.

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.46%. Comparing base (83beb34) to head (a9ad991).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #102 +/- ## ========================================== + Coverage 88.42% 88.46% +0.03% ========================================== Files 1 2 +1 Lines 311 312 +1 Branches 41 41 ========================================== + Hits 275 276 +1 Misses 30 30 Partials 6 6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

yarikoptic commented 2 weeks ago

So we might indeed refactor it to reside in multiple files but not sure if we are reaching threshold yet -- couldn't we substitute __version__ within __main__.py directly (if you really want to be able to python -m duct it)

jwodder commented 2 weeks ago

The biggest benefit to putting __version__ in __init__.py is that it'll show up when users do pydoc duct. Other than that, it's mostly just tradition.

asmacdo commented 2 weeks ago

I'd vote to go ahead and leave 'version' in 'init' so we don't build up weirdness to address later. If the no-install use case is requested by users maybe we revisit?

yarikoptic commented 2 weeks ago

ok