Skip to content

Commit

Permalink
Fix lint (#414)
Browse files Browse the repository at this point in the history
* update pre-commit hooks

* fix flake8 C420
  • Loading branch information
mumichae committed Aug 7, 2024
1 parent 584fe4f commit a515946
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 19 deletions.
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@ default_stages:
minimum_pre_commit_version: 2.16.0
repos:
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 24.8.0
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
rev: 1.18.0
hooks:
- id: blacken-docs
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.3.0
rev: v2.14.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, '4']
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.6.0
rev: v2.0.4
hooks:
- id: autopep8
args: [-i]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/asottile/yesqa
rev: v1.3.0
rev: v1.5.0
hooks:
- id: yesqa
additional_dependencies:
Expand All @@ -40,7 +40,7 @@ repos:
- flake8-bugbear
- flake8-blind-except
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.6.0
hooks:
- id: detect-private-key
- id: check-ast
Expand All @@ -51,7 +51,7 @@ repos:
exclude: setup.cfg
- id: check-case-conflict
- repo: https://github.com/myint/autoflake
rev: v1.4
rev: v2.3.1
hooks:
- id: autoflake
args:
Expand All @@ -60,7 +60,7 @@ repos:
- --remove-unused-variable
- --ignore-init-module-imports
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies:
Expand All @@ -71,7 +71,7 @@ repos:
- flake8-bugbear
- flake8-blind-except
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.1
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py3-plus, --py37-plus, --keep-runtime-typing]
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
)
sys.stdout.write("Compile knn_graph C++ code for LISI metric...\n")
sys.stdout.flush()
subprocess.check_output(
cmd, stderr=subprocess.STDOUT, shell=True, universal_newlines=True
)
subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True, text=True)
except subprocess.CalledProcessError as exc:
sys.stdout.write(
f"Failed to compile knn_graph for LISI - skipping...\n{exc.returncode}\n{exc.output}"
Expand Down
8 changes: 2 additions & 6 deletions tests/preprocessing/test_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,8 @@ def test_merge_adatas(adata_paul15_template):

# create ambiguous column names
adata.var[["1", "2"]] = (0, 2)
adata.var = adata.var.rename(
columns={name: "ambig_var" for name in adata.var.columns.values}
)
adata.obs = adata.obs.rename(
columns={name: "ambig_obs" for name in adata.obs.columns.values}
)
adata.var = adata.var.rename(columns=dict.fromkeys(adata.var.columns, "ambig_var"))
adata.obs = adata.obs.rename(columns=dict.fromkeys(adata.obs.columns, "ambig_obs"))

LOGGER.debug(adata)

Expand Down

0 comments on commit a515946

Please sign in to comment.