Skip to content

Commit

Permalink
pre-commitで利用するツールをローカルのものに変更
Browse files Browse the repository at this point in the history
mypyで検知されたエラーを修正
  • Loading branch information
johtani committed Jul 7, 2023
1 parent fddd5f4 commit 565f5ad
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 15 deletions.
33 changes: 21 additions & 12 deletions .pre-commit-config.yaml
@@ -1,18 +1,27 @@
repos:
- repo: https://github.com/psf/black
rev: 23.3.0
- repo: local
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
name: black
entry: black
language: system
types:
- python
- id: flake8
additional_dependencies: [flake8-pyproject]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
name: flake8
entry: flake8
language: system
types:
- python
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
hooks:
name: isort
entry: isort
language: system
types:
- python
- id: mypy
name: mypy
entry: mypy
language: system
types:
- python
2 changes: 1 addition & 1 deletion backend/es/indexer.py
Expand Up @@ -29,7 +29,7 @@ def load_schema_from_file(self) -> dict:
return schema

def is_exist_index(self) -> bool:
return self.esclient.indices.exists(index=self.config.index)
return self.esclient.indices.exists(index=self.config.index).body

def delete_index(self):
self.esclient.indices.delete(index=self.config.index)
Expand Down
18 changes: 17 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion pyproject.toml
Expand Up @@ -23,6 +23,7 @@ black = "^23.3.0"
flake8 = "^6.0.0"
isort = "^5.12.0"
mypy = "^1.4.1"
flake8-pyproject = "^1.2.3"

[build-system]
requires = ["poetry-core"]
Expand All @@ -41,4 +42,5 @@ multi_line_output = 3
[tool.flake8]
max_line_length = 120

[tool.mypy]
[tool.mypy]
ignore_missing_imports = true

0 comments on commit 565f5ad

Please sign in to comment.