Skip to content

Fix mypy warnings about untyped functions #1327

Open
Mr-Geekman opened this issue Jul 24, 2023 · 1 comment
Open

Fix mypy warnings about untyped functions #1327

Mr-Geekman opened this issue Jul 24, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request priority/medium Medium priority task

Comments

@Mr-Geekman
Copy link
Contributor

Mr-Geekman commented Jul 24, 2023

🚀 Feature Request

Fix mypy warnings about untyped functions, because now it shows warnings like:

etna/transforms/decomposition/change_points_based/per_interval_models/constant.py:13: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]

Proposal

  • Fix warnings
  • Try to add option disallow-untyped-defs
    • It there aren't too many errors fix them and keep this option

Test cases

No response

Additional context

Developing in docs-prototype branch.

@Mr-Geekman Mr-Geekman added the enhancement New feature or request label Jul 24, 2023
@Mr-Geekman Mr-Geekman added this to the Documentation rework milestone Jul 24, 2023
@Mr-Geekman Mr-Geekman changed the title Add return type None in places where it isn't set Fix mypy warnings about untyped functions Jul 24, 2023
@Mr-Geekman Mr-Geekman added priority/medium Medium priority task documentation Improvements or additions to documentation labels Jul 24, 2023
@Mr-Geekman
Copy link
Contributor Author

Setting disallow_untyped_defs = true in pyproject.toml gives:

Found 358 errors in 99 files (checked 195 source files)

So, this issue requires a lot of changes. However, most of that I've seen is very simple.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request priority/medium Medium priority task
Projects
Status: Todo
Development

No branches or pull requests

1 participant