Skip to content
Snippets Groups Projects
Commit 3bd5814d authored by Paolo Veglio's avatar Paolo Veglio
Browse files

fixed error message

parent 172928d8
No related branches found
No related tags found
No related merge requests found
...@@ -4,21 +4,21 @@ exclude: "^$" ...@@ -4,21 +4,21 @@ exclude: "^$"
fail_fast: false fail_fast: false
repos: repos:
- repo: https://github.com/PyCQA/flake8 - repo: https://github.com/PyCQA/flake8
rev: 6.1.0 rev: 7.1.1
hooks: hooks:
- id: flake8 - id: flake8
additional_dependencies: additional_dependencies:
[flake8-docstrings, flake8-debugger, flake8-bugbear, mccabe] [flake8-docstrings, flake8-debugger, flake8-bugbear, mccabe]
args: [--max-complexity, "10", --ignore, "C901,E501"] args: [--max-complexity, "10", --ignore, "C901,E501"]
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0 rev: v4.6.0
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
- id: end-of-file-fixer - id: end-of-file-fixer
- id: check-yaml - id: check-yaml
- id: check-added-large-files - id: check-added-large-files
- repo: https://github.com/pycqa/isort - repo: https://github.com/pycqa/isort
rev: 5.12.0 rev: 5.13.2
hooks: hooks:
- id: isort - id: isort
language_version: python3 language_version: python3
...@@ -33,7 +33,7 @@ repos: ...@@ -33,7 +33,7 @@ repos:
# - types-requests # - types-requests
# args: ["--python-version", "3.8", "--ignore-missing-imports"] # args: ["--python-version", "3.8", "--ignore-missing-imports"]
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 23.7.0 # Replace by any tag/version: https://github.com/psf/black/tags rev: 24.8.0 # Replace by any tag/version: https://github.com/psf/black/tags
hooks: hooks:
- id: black - id: black
language_version: python3 # Should be a command that runs python3.6+ language_version: python3 # Should be a command that runs python3.6+
......
...@@ -141,7 +141,8 @@ class CloudTests: ...@@ -141,7 +141,8 @@ class CloudTests:
idx = np.nonzero((rad >= thr) & (self.data[self.scene_name].values[scene_idx] == 1)) idx = np.nonzero((rad >= thr) & (self.data[self.scene_name].values[scene_idx] == 1))
if idx is None: if idx is None:
ValueError("Something went wrong and idx is not defined.") errstr = "Something went wrong and idx is not defined."
raise ValueError(errstr)
test_bits = np.zeros(rad.shape) test_bits = np.zeros(rad.shape)
test_bits[idx] = 1 test_bits[idx] = 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment