Skip to content

Commit

Permalink
Merge pull request #428 from lsst/tickets/DM-45209
Browse files Browse the repository at this point in the history
DM-45209: Fix E721 linter warning
  • Loading branch information
timj committed Jul 12, 2024
2 parents 2c4bb8d + 1c2dc1e commit b5f5636
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
name: isort (python)
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.6
rev: v0.5.1
hooks:
- id: ruff
- repo: https://github.com/numpy/numpydoc
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/pipe/base/_task_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ def _validate_value(self, value: Any) -> tuple[str, Any]:

type0 = type(value[0])
for i in value:
if type(i) != type0:
if type(i) is not type0:
raise ValueError(
"Type mismatch in supplied list. TaskMetadata requires all"
f" elements have same type but see {type(i)} and {type0}."
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/pipe/base/tests/no_dimensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def run(self, input: TaskMetadata | dict[str, int]) -> Struct:
# Can change the return type via configuration.
if "TaskMetadata" in cast(NoDimensionsTestConfig, self.config).outputSC:
output = TaskMetadata.from_dict(output) # type: ignore
elif type(output) == TaskMetadata:
elif type(output) is TaskMetadata:
# Want the output to be a dict
output = output.to_dict()
self.log.info("Run method returns data of type: %s", get_full_type_name(output))
Expand Down

0 comments on commit b5f5636

Please sign in to comment.