Skip to content

Commit 0ca00f1

Browse files
pre-commit auto-fixes
1 parent 2f78c31 commit 0ca00f1

File tree

7 files changed

+19
-20
lines changed

7 files changed

+19
-20
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Steps to reproduce the behavior:
1414
3. Scroll down to '....'
1515
4. See error
1616

17-
Provide any example files that are needed to reproduce the error,
17+
Provide any example files that are needed to reproduce the error,
1818
especially if the bug pertains to parsing of a file.
1919

2020
**Expected behavior**

.github/PULL_REQUEST_TEMPLATE.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ Include a summary of major changes in bullet points:
1010
## Additional dependencies introduced (if any)
1111

1212
* List all new dependencies needed and justify why. While adding dependencies that bring
13-
significantly useful functionality is perfectly fine, adding ones that
13+
significantly useful functionality is perfectly fine, adding ones that
1414
add trivial functionality, e.g., to use one single easily implementable
15-
function, is frowned upon. Provide a justification why that dependency is needed.
15+
function, is frowned upon. Provide a justification why that dependency is needed.
1616
Especially frowned upon are circular dependencies, e.g., depending on derivative
1717
modules of pymatgen such as custodian or Fireworks.
1818

1919
## TODO (if any)
2020

21-
If this is a work-in-progress, write something about what else needs
21+
If this is a work-in-progress, write something about what else needs
2222
to be done
2323

2424
* Feature 1 supports A, but not B.
@@ -33,15 +33,15 @@ Before a pull request can be merged, the following items must be checked:
3333
- [ ] Code is in the [standard Python style](https://www.python.org/dev/peps/pep-0008/). The easiest way to handle this
3434
is to run the following in the **correct sequence** on your local machine. Start with running
3535
[black](https://black.readthedocs.io/en/stable/index.html) on your new code. This will automatically reformat
36-
your code to PEP8 conventions and removes most issues. Then run
37-
[pycodestyle](https://pycodestyle.readthedocs.io/en/latest/), followed by
36+
your code to PEP8 conventions and removes most issues. Then run
37+
[pycodestyle](https://pycodestyle.readthedocs.io/en/latest/), followed by
3838
[flake8](http://flake8.pycqa.org/en/latest/).
3939
- [ ] Docstrings have been added in the [Google docstring format](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html).
4040
Run [pydocstyle](http://www.pydocstyle.org/en/2.1.1/index.html) on your code.
4141
- [ ] Type annotations are **highly** encouraged. Run [mypy](http://mypy-lang.org/) to type check your code.
4242
- [ ] Tests have been added for any new functionality or bug fixes.
4343
- [ ] All linting and tests pass.
4444

45-
Note that the CI system will run all the above checks. But it will be much more efficient if you already fix most
46-
errors prior to submitting the PR. It is highly recommended that you use the pre-commit hook provided in the pymatgen
45+
Note that the CI system will run all the above checks. But it will be much more efficient if you already fix most
46+
errors prior to submitting the PR. It is highly recommended that you use the pre-commit hook provided in the pymatgen
4747
repository. Simply `cp pre-commit .git/hooks` and a check will be run prior to allowing commits.

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ jobs:
4141
flake8 --count --exit-zero --max-complexity=20 --statistics pymatgen
4242
- name: pydocstyle
4343
run: |
44-
pydocstyle --count pymatgen
44+
pydocstyle --count pymatgen

pymatgen/db/aliases.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"aliases": {
33
"energy": "output.final_energy",
4-
"energy_per_atom": "output.final_energy_per_atom",
5-
"final_atoms": "output.crystal.sites",
6-
"final_lattice": "output.crystal.lattice",
7-
"final_structure": "output.crystal",
4+
"energy_per_atom": "output.final_energy_per_atom",
5+
"final_atoms": "output.crystal.sites",
6+
"final_lattice": "output.crystal.lattice",
7+
"final_structure": "output.crystal",
88
"formula": "unit_cell_formula",
99
"initial_atoms": "input.crystal.sites",
10-
"initial_lattice": "input.crystal.lattice",
11-
"initial_structure": "input.crystal",
10+
"initial_lattice": "input.crystal.lattice",
11+
"initial_structure": "input.crystal",
1212
"normalized_formula": "reduced_cell_formula",
1313
"reduced_cell_formula": "reduced_cell_formula",
1414
"volume": "output.crystal.lattice.volume"
15-
},
15+
},
1616
"defaults": {
1717
"state": "successful"
1818
}
19-
}
19+
}

pymatgen/db/creator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ def generate_doc(self, dir_name, vasprun_files):
551551
"pot_type": pot_type.lower(),
552552
"labels": d2["input"]["potcar"],
553553
}
554-
if len(d["calculations"]) == len(self.runs) or list(vasprun_files.keys())[0] != "relax1":
554+
if len(d["calculations"]) == len(self.runs) or next(iter(vasprun_files.keys())) != "relax1":
555555
d["state"] = "successful" if d2["has_vasp_completed"] else "unsuccessful"
556556
else:
557557
d["state"] = "stopped"

pytest.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[pytest]
2-
addopts = --durations=30 --quiet
2+
addopts = --durations=30 --quiet

setup.cfg

-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ per-file-ignores =
1616
[pydocstyle]
1717
ignore = D105,D2,D4
1818
match-dir=(?!(tests)).*
19-

0 commit comments

Comments
 (0)