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

Bump ruff and mypy #1762

Merged
merged 3 commits into from
Aug 25, 2023
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
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ orjson = { version = "~3.8.3", optional = true}
copier = { version = ">=7.0.0", optional = true }
jinja2-time = { version = "^0.2.0", optional = true }
black = { version = "^23.3.0", optional = true }
ruff = { version = "^0.0.282", optional = true }
ruff = { version = "^0.0.285", optional = true }

# Optional dependencies for the AWS secrets store
boto3 = { version=">=1.16.0,<=1.24.59", optional = true }
Expand Down Expand Up @@ -126,7 +126,7 @@ adlfs = {version = ">=2021.10.0", optional = true}

# Optional development dependencies
coverage = { extras = ["toml"], version = "^5.5", optional = true }
mypy = { version = "1.3.0", optional = true }
mypy = { version = "1.5.1", optional = true }
pre-commit = { version = "^2.14.0", optional = true }
pyment = { version = "^0.3.3", optional = true }
tox = { version = "^3.24.3", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion src/zenml/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def __dictify(model: T) -> Dict[str, str]:
# Explicitly defined columns take precedence over exclude columns
if not columns:
include_columns = [
k for k in model.dict().keys() if k not in exclude_columns # type: ignore[operator]
k for k in model.dict().keys() if k not in exclude_columns
]
else:
include_columns = columns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def load(self, data_type: Type[Any]) -> Profile:
"""
filepath = os.path.join(self.uri, DEFAULT_FILENAME)
contents = yaml_utils.read_json(filepath)
if type(contents) != dict:
if not isinstance(contents, dict):
raise TypeError(
f"Contents {contents} was type {type(contents)} but expected "
f"dictionary"
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/steps/test_base_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,8 +620,8 @@ def raw_artifact_test_step_3(

@step
def raw_artifact_test_step_4(dict_: Dict, list_: List) -> None:
assert type(dict_) is dict
assert type(list_) is list
assert isinstance(dict_, dict)
assert isinstance(list_, list)


def test_step_can_have_raw_artifacts(clean_client):
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/steps/test_base_step_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ def test_input_validation_outside_of_pipeline():

output = step_with_int_input(input_=1)
assert output == 1
assert type(output) is int
assert isinstance(output, int)

output = step_with_int_input(input_=3.0)
assert output == 3
assert type(output) is int
assert isinstance(output, int)


def test_input_validation_inside_pipeline():
Expand Down
Loading