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

fix: Include py.typed module when building package #319

Merged
merged 6 commits into from
Jun 10, 2024

Conversation

skorokithakis
Copy link
Collaborator

This is actually @maximeflya's #317, which fixes #316. I realized the formatting CI action was wrong (it should run pre-commit), and thus #317 was needlessly reformatted. I created this PR to hopefully get things right.

@maximeflya, does this look ok?

@maximeflya
Copy link

You probably should clean your linters config files:
In pyproject.toml, you define the configuration for black
In setup.cfg, you define the configuration for isort and flake8
And in the pre-commit hook, you run ruff which is not configured anywhere

In my PR the formatting changed because black is configured to a line length of 120 (also flake8) where its default is 88. (Personally I prefer keeping the default)

In this case though, I don't think your CI is doing anything:

[INFO] Initializing environment for https://github.com/astral-sh/ruff-pre-commit.
[INFO] Installing environment for https://github.com/astral-sh/ruff-pre-commit.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
ruff.................................................(no files to check)Skipped
ruff-format..........................................(no files to check)Skipped

Maybe there is a parameter to run it on the whole code base in the CI.

Overall running the pre-commit hook like you did is very clean if it works 👍 I wasn't familiar with pre-commit but that's kind of nice

(Also I'm not sure what the semantic release parameter is used for in the pyproject.toml, but it would be incorrect with the new changes.

@skorokithakis
Copy link
Collaborator Author

Thank you! I cleaned stuff up in setup.cfg and pyproject.toml, as per your suggestion! I had assumed that the pre-commit action will be running on all files (as there's no point otherwise), but I've forced it to now.

@skorokithakis skorokithakis merged commit e2d0fd4 into master Jun 10, 2024
2 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.

py.typed missing in package
2 participants