Skip to content

Commit

Permalink
Remove all no_type_check mark, fix new mypy error in 1.12.0 (#4110
Browse files Browse the repository at this point in the history
)

* remove no_type_check mark

* remove no_type_check from plotter as it seems this have to go first

* remove mypy version pin

* take it slow and pin mypy for now

* fix io.lmto

* fix electronic structure plotter

* fix phase diagram

* fix pourbaix diagram

* migrate config

* bump pyright version

* fix pyright in io.lmto

* fix pyright in phase diagram

* remove mypy pin

* fix vis.structure_vtk

* fix core ptable

* pre-commit auto-fixes

* fix lobtser outputd

* fix typo in vasprun test

* handle converged_electronic for vasp ALGO=CHI

* fix another vasp.output error

* tweak code style a bit

* suppress overload error for now

* fix electronic structure plotter

* tweak code style a bit

* fix type

* fix incorrect type of cn

* use overload type

* bump pre-commit, mainly to get mypy 1.12

* fix incorrect return type of get_parameters

* fix most errors in local_env

* all done

* use set to check membership

* a bit more specific type for DEFAULT_OP_PARAMS

---------

Signed-off-by: Shyue Ping Ong <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Shyue Ping Ong <[email protected]>
  • Loading branch information
3 people authored Oct 21, 2024
1 parent a7a3ba5 commit 723d9b8
Show file tree
Hide file tree
Showing 15 changed files with 313 additions and 252 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.x'

- name: Install dependencies
run: |
pip install --upgrade ruff 'mypy<1.12' pyright
pip install --upgrade ruff mypy pyright
- name: ruff
run: |
ruff --version
ruff check .
ruff format --check .
Expand Down
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@ ci:

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
rev: v0.6.9
hooks:
- id: ruff
args: [--fix, --unsafe-fixes]
- id: ruff-format

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.12.0
hooks:
- id: mypy

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
stages: [commit, commit-msg]
stages: [pre-commit, commit-msg]
exclude_types: [html]
additional_dependencies: [tomli] # needed to read pyproject.toml below py3.11
exclude: src/pymatgen/analysis/aflow_prototypes.json
Expand All @@ -43,12 +43,12 @@ repos:
- id: double-quote-cython-strings

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.18.0
rev: 1.19.0
hooks:
- id: blacken-docs

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
rev: v0.42.0
hooks:
- id: markdownlint
# MD013: line too long
Expand All @@ -65,6 +65,6 @@ repos:
args: [--drop-empty-cells, --keep-output]

- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.379
rev: v1.1.384
hooks:
- id: pyright
Loading

0 comments on commit 723d9b8

Please sign in to comment.