From 80dd3c61017693d1575681ee9cd71785d47870f4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 19:24:05 +0000 Subject: [PATCH 1/2] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.11 → v0.14.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.11...v0.14.7) - [github.com/pre-commit/mirrors-mypy: v1.17.1 → v1.19.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.17.1...v1.19.0) - [github.com/MarcoGorelli/cython-lint: v0.16.7 → v0.18.1](https://github.com/MarcoGorelli/cython-lint/compare/v0.16.7...v0.18.1) - [github.com/adamchainz/blacken-docs: 1.19.1 → 1.20.0](https://github.com/adamchainz/blacken-docs/compare/1.19.1...1.20.0) - [github.com/igorshubovych/markdownlint-cli: v0.45.0 → v0.46.0](https://github.com/igorshubovych/markdownlint-cli/compare/v0.45.0...v0.46.0) - [github.com/kynan/nbstripout: 0.8.1 → 0.8.2](https://github.com/kynan/nbstripout/compare/0.8.1...0.8.2) - [github.com/RobertCraigie/pyright-python: v1.1.404 → v1.1.407](https://github.com/RobertCraigie/pyright-python/compare/v1.1.404...v1.1.407) --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dfe603b..0c2f2bf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ ci: repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.11 + rev: v0.14.7 hooks: - id: ruff args: [--fix, --unsafe-fixes] @@ -22,7 +22,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.17.1 + rev: v1.19.0 hooks: - id: mypy @@ -36,19 +36,19 @@ repos: exclude: src/pymatgen/analysis/aflow_prototypes.json - repo: https://github.com/MarcoGorelli/cython-lint - rev: v0.16.7 + rev: v0.18.1 hooks: - id: cython-lint args: [--no-pycodestyle] - id: double-quote-cython-strings - repo: https://github.com/adamchainz/blacken-docs - rev: 1.19.1 + rev: 1.20.0 hooks: - id: blacken-docs - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.45.0 + rev: v0.46.0 hooks: - id: markdownlint # MD013: line too long @@ -59,12 +59,12 @@ repos: args: [--disable, MD013, MD024, MD025, MD033, MD041, "--"] - repo: https://github.com/kynan/nbstripout - rev: 0.8.1 + rev: 0.8.2 hooks: - id: nbstripout args: [--drop-empty-cells, --keep-output] - repo: https://github.com/RobertCraigie/pyright-python - rev: v1.1.404 + rev: v1.1.407 hooks: - id: pyright From 8da1c50505d654180f0e0d6a011336b6494e0d3d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 19:25:19 +0000 Subject: [PATCH 2/2] pre-commit auto-fixes --- src/pymatgen/db/cli.py | 2 +- src/pymatgen/db/creator.py | 5 ++--- src/pymatgen/db/matproj.py | 1 - src/pymatgen/db/query_engine.py | 1 - 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/pymatgen/db/cli.py b/src/pymatgen/db/cli.py index 2c1bcb6..4224eed 100644 --- a/src/pymatgen/db/cli.py +++ b/src/pymatgen/db/cli.py @@ -9,9 +9,9 @@ import multiprocessing import sys +from pymatgen.apps.borg.queen import BorgQueen from pymongo import ASCENDING, MongoClient -from pymatgen.apps.borg.queen import BorgQueen from pymatgen.db import SETTINGS from .config import DBConfig, get_settings diff --git a/src/pymatgen/db/creator.py b/src/pymatgen/db/creator.py index bc7529d..1975811 100644 --- a/src/pymatgen/db/creator.py +++ b/src/pymatgen/db/creator.py @@ -21,8 +21,6 @@ import numpy as np from monty.io import zopen from monty.json import MontyEncoder -from pymongo import MongoClient - from pymatgen.analysis.bond_valence import BVAnalyzer from pymatgen.analysis.local_env import VoronoiNN from pymatgen.analysis.structure_analyzer import oxide_type @@ -34,6 +32,7 @@ from pymatgen.io.cif import CifWriter from pymatgen.io.vasp import Incar, Kpoints, Oszicar, Outcar, Poscar, Potcar, Vasprun from pymatgen.symmetry.analyzer import SpacegroupAnalyzer +from pymongo import MongoClient __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" @@ -587,7 +586,7 @@ def get_valid_paths(self, path): 3. Directories containing vasp output with ".relax1" and ".relax2" are also considered as 2 parts of an aflow style run. """ - (parent, subdirs, files) = path + (parent, subdirs, _files) = path if set(self.runs).intersection(subdirs): return [parent] if ( diff --git a/src/pymatgen/db/matproj.py b/src/pymatgen/db/matproj.py index 7db4b41..6a3ad4c 100644 --- a/src/pymatgen/db/matproj.py +++ b/src/pymatgen/db/matproj.py @@ -9,7 +9,6 @@ import itertools import pymongo - from pymatgen.entries.computed_entries import ComputedStructureEntry from pymatgen.ext.matproj import MPRester diff --git a/src/pymatgen/db/query_engine.py b/src/pymatgen/db/query_engine.py index 0cb0530..6b93bfe 100644 --- a/src/pymatgen/db/query_engine.py +++ b/src/pymatgen/db/query_engine.py @@ -23,7 +23,6 @@ import gridfs import pymongo - from pymatgen.core import Composition, Structure from pymatgen.electronic_structure.core import Orbital, Spin from pymatgen.electronic_structure.dos import CompleteDos, Dos