Skip to content

Commit

Permalink
remove pyupgrade because it creates python 3.9 backwards-incompatible…
Browse files Browse the repository at this point in the history
… typing for PEP604
  • Loading branch information
esoteric-ephemera committed May 14, 2024
1 parent ee6263a commit 1da4a4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.1
hooks:
- id: pyupgrade
args: [--py38-plus]
#- repo: https://github.com/asottile/pyupgrade
# rev: v3.15.1
# hooks:
# - id: pyupgrade
# args: [--py38-plus]

- repo: https://github.com/PyCQA/autoflake
rev: v2.3.0
Expand Down
4 changes: 2 additions & 2 deletions pymatgen/io/validation/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from pymatgen.io.validation.check_potcar import CheckPotcar
from pymatgen.io.validation.settings import IOValidationSettings

from typing import TYPE_CHECKING
from typing import Optional, TYPE_CHECKING

if TYPE_CHECKING:
from typing import Any
Expand All @@ -53,7 +53,7 @@ class ValidationDoc(EmmetBaseModel):
Validation document for a VASP calculation
"""

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

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

Expand Down

0 comments on commit 1da4a4b

Please sign in to comment.