Skip to content

Commit

Permalink
Codacy quality fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeyiasemis committed Apr 18, 2024
1 parent 5b2629a commit dc0ae07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion direct/ssl/mask_fillers.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def uniform_fill(
replace=False,
p=prob / prob.sum(),
)
(ind_x, ind_y) = np.unravel_index(ind_flattened, (nrow, ncol))
(ind_x, ind_y) = np.unravel_index(ind_flattened, (nrow, ncol)) # pylint: disable=unbalanced-tuple-unpacking

output_mask = torch.zeros_like(mask, dtype=mask.dtype)
output_mask[ind_x, ind_y] = True
Expand Down
4 changes: 2 additions & 2 deletions direct/ssl/ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def _gaussian_split(
if self.keep_acs:
if acs_mask is None:
raise ValueError("`keep_acs` is set to True but not received an input for `acs_mask`.")
mask = mask & (~acs_mask)
mask = mask & (~acs_mask) # pylint: disable=invalid-unary-operand-type

with temp_seed(self.rng, seed):
if seed is None:
Expand Down Expand Up @@ -277,7 +277,7 @@ def _uniform_split(
if self.keep_acs:
if acs_mask is None:
raise ValueError("`keep_acs` is set to True but not received an input for `acs_mask`.")
mask = mask & (~acs_mask)
mask = mask & (~acs_mask) # pylint: disable=invalid-unary-operand-type

temp_mask = mask.cpu().clone()

Expand Down

0 comments on commit dc0ae07

Please sign in to comment.