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

chore: Refactored dependencies management and fixed linters configurations #1452

Closed

Conversation

svdimchenko
Copy link
Contributor

@svdimchenko svdimchenko commented Mar 6, 2024

I've implemented the following optimisations and fixes:

  • generalised dependencies in pyproject.toml (before there was extra dev-requirements.txt file)
  • enabled mypy check (it was somehow disabled at all)
    Found 408 errors in 74 files (checked 149 source files)
  • enabled black (seems it was disabled as well)
  • bumped pre-commit hooks to the latest versions

TODO:
the following flags shoould be removed and corresponding code fixed:
--strict (to enable)
--allow-untyped-defs (to remove)
--allow-untyped-call (to remove)

@svdimchenko svdimchenko marked this pull request as ready for review March 6, 2024 20:50
@haritamar
Copy link
Collaborator

HI @svdimchenko ,
Wow, thanks for all this effort, sorry for the late response.
We've accumulated some backlog in our PRs that we're just getting into.

Admittedly though, I don't feel very comfortable with merging this PR since it's pretty huge and touches a lot of code.

I think we'll likely incorporate some of the changes into separate, smaller PRs:

  • Moving dev-requirements to poetry.
  • Upgrading some of the pre-commit versions

Changes I'm less sure about:

  • Moving mypy configuration to pyproject.toml - what is the motivation? I think in particular the configuration file allowed us to only ignore missing imports for specific packages that don't have stubs.
  • Changing line lengths in black and flake to 120 - mainly because it's not aligned with a separate internal repo we have, and not sure it's important enough given the amount of changes it's producing / messing git blame.

Also curious about your comment that mypy and black were disabled - that's interesting, they definitely do run regularly in our pre-commits and CI. Where did you see that they were disabled?

For now though I'm closing this PR.

@haritamar haritamar closed this May 22, 2024
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.

None yet

2 participants