Skip to content

Commit 1da4a4b

Browse files
remove pyupgrade because it creates python 3.9 backwards-incompatible typing for PEP604
1 parent ee6263a commit 1da4a4b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ repos:
2727
- id: end-of-file-fixer
2828
- id: trailing-whitespace
2929

30-
- repo: https://github.com/asottile/pyupgrade
31-
rev: v3.15.1
32-
hooks:
33-
- id: pyupgrade
34-
args: [--py38-plus]
30+
#- repo: https://github.com/asottile/pyupgrade
31+
# rev: v3.15.1
32+
# hooks:
33+
# - id: pyupgrade
34+
# args: [--py38-plus]
3535

3636
- repo: https://github.com/PyCQA/autoflake
3737
rev: v2.3.0

pymatgen/io/validation/validation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
from pymatgen.io.validation.check_potcar import CheckPotcar
3737
from pymatgen.io.validation.settings import IOValidationSettings
3838

39-
from typing import TYPE_CHECKING
39+
from typing import Optional, TYPE_CHECKING
4040

4141
if TYPE_CHECKING:
4242
from typing import Any
@@ -53,7 +53,7 @@ class ValidationDoc(EmmetBaseModel):
5353
Validation document for a VASP calculation
5454
"""
5555

56-
task_id: MPID = Field(None, description="The task_id for this validation document")
56+
task_id: Optional[MPID] = Field(None, description="The task_id for this validation document")
5757

5858
valid: bool = Field(False, description="Whether this task is valid or not")
5959

0 commit comments

Comments
 (0)