adamjstewart / fiscalyear

:calendar: Utilities for managing the fiscal calendar
MIT License
52 stars 13 forks source link

[Question]: Why is the implementation primarily inside of `__init__.py`? #32

Closed galenseilis closed 8 months ago

galenseilis commented 8 months ago

I just noticed that the code is primarily inside a __init__.py. That's an unconventional choice which seems to work fine, but I'm just curious why it was made as a design choice for this package.

adamjstewart commented 8 months ago

This is for historical reasons. The original implementation was a single fiscalyear.py file, similar to how six is packaged. However, in order to add type hints to the library, you have to add a py.typed file in the package directory. So I created a fiscalyear directory, added py.typed, and renamed fiscalyear.py to fiscalyear/__init__.py to keep the imports the same.

galenseilis commented 8 months ago

Alright, thank you for that summary.