mozilla / FoxPuppet

Other
17 stars 14 forks source link

Add pyright static type checking #314

Open b4handjr opened 3 days ago

b4handjr commented 3 days ago

Let's add a static type checking tool to this project and get all of the classes and methods to be statically typed. We can use mypy for this since this is what we are mainly using at Mozilla.

Here are some basic options we should use my mypy, we can adjust these later as well. These should exist within the pyproject.toml file.

[tool.mypy]
python_version = "3.12"
disable_error_code = "attr-defined"
disallow_untyped_calls = false
follow_imports = "normal"
ignore_missing_imports = true
pretty = true
show_error_codes = true
strict_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_ignores = true
warn_unreachable = true
cashall-0 commented 2 days ago

hello @b4handjr , I would like to work on this. I'd try to do the type-checking.