@@ -114,7 +114,7 @@ prototypes = ["pyxtal>=1.0", "pymatgen[symmetry]"]
114114symmetry = [" moyopy[interface]>=0.3" , " spglib>=2.5" ]
115115# tblite only support Python 3.12+ through conda-forge
116116# https://github.com/tblite/tblite/issues/175
117- tblite = [ " tblite[ase]>=0.3.0; platform_system=='Linux' and python_version<'3.12'" ]
117+ tblite = [" tblite[ase]>=0.3.0; platform_system=='Linux' and python_version<'3.12'" ]
118118vis = [" vtk>=6.0.0" ]
119119ci = [
120120 " pytest>=8.3.5" ,
@@ -186,27 +186,27 @@ ignore = [
186186 " C90" , # Check for functions with a high McCabe complexity
187187 " COM" , # flake8-commas (conflict with line wrapper)
188188 " CPY" , # Missing copyright notice at top of file (need preview mode)
189- " EM" , # Format nice error messages
189+ " EM" , # Format nice error messages
190190 " ERA" , # Check for commented-out code
191191 " FIX" , # Check for FIXME, TODO and other developer notes
192- " G" , # Validate logging format strings
192+ " G" , # Validate logging format strings
193193 " INP" , # Ban PEP-420 implicit namespace packages
194- " N" , # PEP8-naming (many var/arg names are intended)
194+ " N" , # PEP8-naming (many var/arg names are intended)
195195 " PTH" , # Prefer pathlib over os.path
196196 " SLF" , # Access "private" class members
197197 " T20" , # Check for print/pprint
198- " TD" , # TODO tags related
198+ " TD" , # TODO tags related
199199
200200 # Single rules
201- " B023" , # Function definition does not bind loop variable
202- " B904" , # Within an except clause, raise exceptions with ...
203- " C408" , # unnecessary-collection-call
204- " D105" , # Missing docstring in magic method
205- " D205" , # One blank line required between summary line and description
206- " D212" , # Multi-line docstring summary should start at the first line
207- " FBT001" , # Boolean-typed positional argument in function definition
208- " FBT002" , # Boolean default positional argument in function
209- " PD011" , # (A lot of false positive on non-Pandas objects)
201+ " B023" , # Function definition does not bind loop variable
202+ " B904" , # Within an except clause, raise exceptions with ...
203+ " C408" , # unnecessary-collection-call
204+ " D105" , # Missing docstring in magic method
205+ " D205" , # One blank line required between summary line and description
206+ " D212" , # Multi-line docstring summary should start at the first line
207+ " FBT001" , # Boolean-typed positional argument in function definition
208+ " FBT002" , # Boolean default positional argument in function
209+ " PD011" , # (A lot of false positive on non-Pandas objects)
210210 " PERF203" , # Use of try-except in for/while loop
211211 " PERF401" , # Replace "for" loops with list comprehension
212212 " PLR0911" , # Too many return statements
@@ -216,18 +216,18 @@ ignore = [
216216 " PLR1702" , # Too many nested blocks
217217 " PLR2004" , # Magic-value-comparison TODO: fix these
218218 " PLW2901" , # Outer for loop variable overwritten by inner assignment target
219- " PT013" , # Incorrect import of pytest
220- " S110" , # Log for try-except-pass
221- " S112" , # Log for try-except-continue
222- " S311" , # Use random module for cryptographic purposes
223- " S314" , # Replace xml with defusedxml to avoid XML attacks
224- " S603" , # Check source for use of "subprocess" call
225- " S607" , # Start process with relative path
226- " SIM105" , # Use contextlib.suppress() instead of try-except-pass
227- " SIM905" , # Split static strings
228- " TRY003" , # Avoid specifying long messages outside the exception class
229- " TRY300" , # Check for return statements in try blocks
230- " TRY301" , # Check for raise statements within try blocks
219+ " PT013" , # Incorrect import of pytest
220+ " S110" , # Log for try-except-pass
221+ " S112" , # Log for try-except-continue
222+ " S311" , # Use random module for cryptographic purposes
223+ " S314" , # Replace xml with defusedxml to avoid XML attacks
224+ " S603" , # Check source for use of "subprocess" call
225+ " S607" , # Start process with relative path
226+ " SIM105" , # Use contextlib.suppress() instead of try-except-pass
227+ " SIM905" , # Split static strings
228+ " TRY003" , # Avoid specifying long messages outside the exception class
229+ " TRY300" , # Check for return statements in try blocks
230+ " TRY301" , # Check for raise statements within try blocks
231231]
232232pydocstyle.convention = " google"
233233isort.required-imports = [" from __future__ import annotations" ]
@@ -240,12 +240,12 @@ docstring-code-format = true
240240[tool .ruff .lint .per-file-ignores ]
241241"__init__.py" = [" F401" ] # unused-import
242242"tests/**" = [
243- " ANN201" , # missing-return-type-undocumented-public-function
244- " D" , # pydocstyle
243+ " ANN201" , # missing-return-type-undocumented-public-function
244+ " D" , # pydocstyle
245245 " PLR0124" , # comparison-with-itself
246246 " PLR2004" , # magic-value-comparison
247247 " PLR6301" , # no-self-use
248- " S101" , # Use of "assert"
248+ " S101" , # Use of "assert"
249249]
250250"src/pymatgen/analysis/*" = [" D" ]
251251"src/pymatgen/io/*" = [" D" ]
@@ -258,8 +258,8 @@ docstring-code-format = true
258258addopts = " --durations=30 --quiet -r xXs --color=yes --import-mode=importlib"
259259filterwarnings = [
260260 # NOTE: the LAST matching option would be used
261- " ignore::UserWarning" , # Ignore UserWarning
262- " error:We strongly encourage explicit `encoding`:EncodingWarning" , # Mark `zopen` EncodingWarning as error
261+ " ignore::UserWarning" , # Ignore UserWarning
262+ " error:We strongly encourage explicit `encoding`:EncodingWarning" , # Mark `zopen` EncodingWarning as error
263263 # TODO: remove the following filter once `monty.io` dropped custom EncodingWarning
264264 " error:We strongly encourage explicit `encoding`:monty.io.EncodingWarning" ,
265265 # TODO: pybtex (perhaps some others) emits the following warnings
@@ -297,7 +297,7 @@ namespace_packages = true
297297explicit_package_bases = true
298298no_implicit_optional = false
299299disable_error_code = [" annotation-unchecked" , " override" , " assignment" , " misc" ] # , "union-attr", "operator", "arg-type", "index", "call-arg", "return-value", "assignment", "attr-defined"]
300- exclude = [' src/pymatgen/analysis' , ' src/pymatgen/io' , ' src/pymatgen/cli' , ' src/pymatgen/electronic_structure' ,]
300+ exclude = [' src/pymatgen/analysis' , ' src/pymatgen/io' , ' src/pymatgen/cli' , ' src/pymatgen/electronic_structure' , ]
301301
302302[[tool .mypy .overrides ]]
303303module = [" requests.*" , " tabulate.*" ]
0 commit comments