Skip to content

Commit 2608d7a

Browse files
committed
remove repeated words
1 parent d069185 commit 2608d7a

File tree

8 files changed

+21
-19
lines changed

8 files changed

+21
-19
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,10 @@ default_install_hook_types: [pre-commit, commit-msg]
99
exclude: ^(docs/|.*test_files/|.*tests/)
1010

1111
repos:
12-
- repo: https://github.com/myint/autoflake
12+
- repo: https://github.com/PyCQA/autoflake
1313
rev: v1.4
1414
hooks:
1515
- id: autoflake
16-
args:
17-
- --in-place
18-
- --remove-unused-variables
19-
- --remove-all-unused-imports
20-
- --expand-star-imports
21-
- --ignore-init-module-imports
2216

2317
- repo: https://github.com/psf/black
2418
rev: 22.6.0
@@ -29,6 +23,7 @@ repos:
2923
rev: 5.0.4
3024
hooks:
3125
- id: flake8
26+
additional_dependencies: [flake8-bugbear]
3227

3328
- repo: https://github.com/pre-commit/mirrors-mypy
3429
rev: v0.971

atomate/qchem/drones.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def validate_doc(self, d):
507507
to pass validation is unfortunately unlikely to be noticed by a user.
508508
"""
509509
for k, v in self.schema.items():
510-
diff = v.difference(set(d.get(k, d).keys()))
510+
diff = v - set(d.get(k, d).keys())
511511
if diff:
512512
logger.warning(f"The keys {diff} in {k} not set")
513513

atomate/utils/database.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(
3535
**kwargs,
3636
):
3737
"""
38-
Obeject to handle storing calculation data to MongoDB databases.
38+
Object to handle storing calculation data to MongoDB databases.
3939
The results of calculations will be parsed by a Drone and
4040
CalcDb is only responsible for putting that data into the database
4141
@@ -50,7 +50,7 @@ def __init__(
5050
other authentication information will be ignored
5151
maggma_store_kwargs: additional kwargs for mongodb login.
5252
Currently supports:
53-
S3 store kwarges:
53+
S3 store kwargs:
5454
"bucket" : the S3 bucket where the data is stored
5555
"s3_profile" : the S3 profile that contains the login information
5656
typically found at ~/.aws/credentials
@@ -255,7 +255,7 @@ def _get_s3_store(self, store_name):
255255
and the store_name will double as the sub_dir name.
256256
257257
Args:
258-
store_name: correspond to the the key within calcs_reversed.0 that will be stored
258+
store_name: correspond to the key within calcs_reversed.0 that will be stored
259259
"""
260260
if self.host_uri is not None:
261261
index_store_ = MongoURIStore(

atomate/vasp/drones.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,9 +828,9 @@ def validate_doc(self, d):
828828
# notice if the validation fails? -computron
829829
for k, v in self.schema.items():
830830
if k == "calcs_reversed":
831-
diff = v.difference(set(d.get(k, d)[0].keys()))
831+
diff = v - set(d.get(k, d)[0].keys())
832832
else:
833-
diff = v.difference(set(d.get(k, d).keys()))
833+
diff = v - set(d.get(k, d).keys())
834834
if diff:
835835
logger.warning(f"The keys {diff} in {k} not set")
836836

atomate/vasp/workflows/base/adsorption.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def get_slab_fw(
3030
add_slab_metadata=True,
3131
):
3232
"""
33-
Function to generate a a slab firework. Returns a TransmuterFW if
33+
Function to generate a slab firework. Returns a TransmuterFW if
3434
bulk_structure is specified, constructing the necessary transformations
3535
from the slab and slab generator parameters, or an OptimizeFW if only a
3636
slab is specified.

atomate/vasp/workflows/base/neb.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def get_wf_neb_from_structure(
8383
user_incar_settings is used to determine how many NEB rounds will be. Default
8484
is [{}, {}, {}].
8585
additional_spec (dict): User spec settings to overwrite default_spec.
86-
user_kpoints_settings ([dict]): Additional user_kpoints_settings, which contains at at
86+
user_kpoints_settings ([dict]): Additional user_kpoints_settings, which contains at
8787
least three elements, which is similar to user_incar_settings. For example,
8888
[{}, {}, {"grid_density": 100}] for the workflow from the parent structure
8989
relaxation, then the endpoint relaxation followed by one-round NEB simulation.
@@ -170,7 +170,7 @@ def get_wf_neb_from_structure(
170170
)
171171
)
172172

173-
for i, label in enumerate(["ep0", "ep1"]):
173+
for label in ["ep0", "ep1"]:
174174
fw = NEBRelaxationFW(
175175
spec=spec,
176176
label=label,
@@ -221,7 +221,7 @@ def get_wf_neb_from_endpoints(
221221
user_incar_settings is used to determine how many NEB rounds will be. Default
222222
is [{}, {}, {}].
223223
additional_spec (dict): User spec settings to overwrite default_spec.
224-
user_kpoints_settings ([dict]): Additional user_kpoints_settings, which contains at at
224+
user_kpoints_settings ([dict]): Additional user_kpoints_settings, which contains at
225225
least three elements, which is similar to user_incar_settings. For example,
226226
[{}, {}, {"grid_density": 100}] for the workflow from the parent structure
227227
relaxation, then the endpoint relaxation followed by one-round NEB simulation.
@@ -320,7 +320,7 @@ def get_wf_neb_from_images(
320320
user_incar_settings is used to determine how many NEB rounds will be. Default
321321
is [{}, {}, {}].
322322
additional_spec (dict): User spec settings to overwrite default_spec.
323-
user_kpoints_settings ([dict]): Additional user_kpoints_settings, which contains at at
323+
user_kpoints_settings ([dict]): Additional user_kpoints_settings, which contains at
324324
least three elements, which is similar to user_incar_settings. For example,
325325
[{}, {}, {"grid_density": 100}] for the workflow from the parent structure
326326
relaxation, then the endpoint relaxation followed by one-round NEB simulation.

dev_scripts/gibbs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def get_gibbs(
8484
# other eos options: birch_murnaghan, murnaghan
8585
# The physical units of V and T are \AA^3 and K, respectively.
8686
# The unit of eV for Helmholtz and Gibbs energies,
87-
# J/K/mol for C_V and entropy, GPa for for bulk modulus and pressure are used.
87+
# J/K/mol for C_V and entropy, GPa for bulk modulus and pressure are used.
8888
from phonopy import PhonopyQHA
8989

9090
phonon = get_phonopy(structure)

setup.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,10 @@ addopts = --ignore=atomate/qchem/test_files -p no:warnings
2727

2828
[codespell]
2929
ignore-words-list = mater,nin
30+
31+
[autoflake]
32+
in-place = true
33+
remove-unused-variables = true
34+
remove-all-unused-imports = true
35+
expand-star-imports = true
36+
ignore-init-module-imports = true

0 commit comments

Comments
 (0)