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

Update the config for pyright #792

Merged
merged 1 commit into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions ethicml/preprocessing/adjust_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ def assert_binary_labels(data_tuple: DataTuple) -> None:
class LabelBinarizer:
"""If a dataset has labels [-1,1], then this will make it so the labels = [0,1]."""

def __init__(self) -> None:
self.min_val: int
self.max_val: int
min_val: int
max_val: int

def adjust(self, dataset: DataTuple) -> DataTuple:
"""Take a datatuple and make the labels [0,1]."""
Expand Down
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,17 @@ convention = "pep257"
add_ignore = ["D105", "D107", "D401"]
ignore_decorators = "implements|overload"
match = "(?!(test_|__init__)).*\\.py"

[tool.pyright]
typeCheckingMode = "strict"
pythonVersion = "3.8"
reportMissingTypeArgument = "none"
reportCallInDefaultInitializer = "warning"
reportPropertyTypeMismatch = "warning"
reportUninitializedInstanceVariable = "warning"
reportUnusedCallResult = "warning"
# these errors are a bit annoying
reportUnknownMemberType = "none"
reportUnknownVariableType = "none"
reportUnknownParameterType = "none"
reportUnknownArgumentType = "none"
10 changes: 0 additions & 10 deletions pyrightconfig.json

This file was deleted.