Skip to content

Commit e06afe9

Browse files
committed
fix double spaces in doc strings
found with regex \b\s{2,}\b[^\d]
1 parent caddde5 commit e06afe9

28 files changed

+42
-40
lines changed

dev_scripts/chemenv/strategies/multi_weights_strategy_parameters.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ def __init__(self, initial_environment_symbol, expected_final_environment_symbol
5151
self.abstract_geometry = AbstractGeometry.from_cg(self.coordination_geometry)
5252

5353
@classmethod
54-
def simple_expansion(cls, initial_environment_symbol, expected_final_environment_symbol, neighbors_indices):
54+
def simple_expansion(
55+
cls, initial_environment_symbol, expected_final_environment_symbol, neighbors_indices
56+
) -> CoordinationEnvironmentMorphing:
5557
"""Simple expansion of a coordination environment.
5658
5759
Args:

dev_scripts/update_spacegroup_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def convert_symmops_to_sg_encoding(symbol: str) -> str:
3030
Args:
3131
symbol (str): "hermann_mauguin" or "universal_h_m" key of symmops.json
3232
Returns:
33-
symbol in the format of SYMM_DATA["space_group_encoding"] keys
33+
str: symbol in the format of SYMM_DATA["space_group_encoding"] keys
3434
"""
3535
symbol_representation = symbol.split(":")
3636
representation = ":" + "".join(symbol_representation[1].split(" ")) if len(symbol_representation) > 1 else ""
@@ -51,7 +51,7 @@ def remove_identity_from_full_hermann_mauguin(symbol: str) -> str:
5151
Args:
5252
symbol (str): "hermann_mauguin" key of symmops.json
5353
Returns:
54-
short "hermann_mauguin" key
54+
str: short "hermann_mauguin" key
5555
"""
5656
if symbol in ("P 1", "C 1", "P 1 "):
5757
return symbol

src/pymatgen/analysis/chemenv/coordination_environments/structure_environments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def from_dict(cls, dct, structure: Structure, detailed_voronoi) -> Self:
373373
the structure and the DetailedVoronoiContainer.
374374
375375
As an inner (nested) class, the NeighborsSet is not supposed to be used anywhere else that inside the
376-
StructureEnvironments. The from_dict method is thus using the structure and detailed_voronoi when
376+
StructureEnvironments. The from_dict method is thus using the structure and detailed_voronoi when
377377
reconstructing itself. These two are both in the StructureEnvironments object.
378378
379379
Args:

src/pymatgen/analysis/interface_reactions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def __init__(
111111

112112
# Factor is the compositional ratio between composition self.c1 and
113113
# processed composition self.comp1. For example, the factor for
114-
# Composition('SiO2') and Composition('O') is 2.0. This factor will be used
114+
# Composition('SiO2') and Composition('O') is 2.0. This factor will be used
115115
# to convert mixing ratio in self.comp1 - self.comp2 tie line to that in
116116
# self.c1 - self.c2 tie line.
117117
self.factor1 = 1.0

src/pymatgen/analysis/local_env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1984,7 +1984,7 @@ def get_okeeffe_distance_prediction(el1, el2):
19841984
"""Get an estimate of the bond valence parameter (bond length) using
19851985
the derived parameters from 'Atoms Sizes and Bond Lengths in Molecules
19861986
and Crystals' (O'Keeffe & Brese, 1991). The estimate is based on two
1987-
experimental parameters: r and c. The value for r is based off radius,
1987+
experimental parameters: r and c. The value for r is based off radius,
19881988
while c is (usually) the Allred-Rochow electronegativity. Values used
19891989
are *not* generated from pymatgen, and are found in
19901990
'okeeffe_params.json'.

src/pymatgen/analysis/magnetism/analyzer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ def ordering(self) -> Ordering:
476476
ferro/ferrimagnetic is self.threshold_ordering and defaults to 1e-8.
477477
478478
Returns:
479-
Ordering: Enum with values FM: ferromagnetic, FiM: ferrimagnetic,
479+
Ordering: Enum with values FM: ferromagnetic, FiM: ferrimagnetic,
480480
AFM: antiferromagnetic, NM: non-magnetic or Unknown. Unknown is
481481
returned if magnetic moments are not defined or structure is not collinear
482482
(in which case a warning is issued).

src/pymatgen/analysis/molecule_matcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def fit(self, mol1, mol2):
589589
mol2: Second molecule. OpenBabel OBMol or pymatgen Molecule object
590590
591591
Returns:
592-
bool: Whether two molecules are the same.
592+
bool: True if two molecules are the same.
593593
"""
594594
return self.get_rmsd(mol1, mol2) < self._tolerance
595595

@@ -598,7 +598,7 @@ def get_rmsd(self, mol1, mol2):
598598
599599
Returns:
600600
RMSD if topology of the two molecules are the same
601-
Infinite if the topology is different
601+
Infinite if the topology is different
602602
"""
603603
label1, label2 = self._mapper.uniform_labels(mol1, mol2)
604604
if label1 is None or label2 is None:

src/pymatgen/analysis/phase_diagram.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ def get_decomp_and_phase_separation_energy(
853853
**kwargs: Passed to get_decomp_and_e_above_hull.
854854
855855
Returns:
856-
tuple[decomp, energy]: The decomposition is given as a dict of {PDEntry, amount}
856+
tuple[decomp, energy]: The decomposition is given as a dict of {PDEntry, amount}
857857
for all entries in the decomp reaction where amount is the amount of the
858858
fractional composition. The phase separation energy is given per atom.
859859
"""
@@ -1547,7 +1547,7 @@ class PatchedPhaseDiagram(PhaseDiagram):
15471547
Note that this does not mean that all these entries are actually used in
15481548
the phase diagram. For example, this includes the positive formation energy
15491549
entries that are filtered out before Phase Diagram construction.
1550-
min_entries (list[PDEntry]): List of the lowest energy entries for each composition
1550+
min_entries (list[PDEntry]): List of the lowest energy entries for each composition
15511551
in the data provided for Phase Diagram construction.
15521552
el_refs (list[PDEntry]): List of elemental references for the phase diagrams.
15531553
These are entries corresponding to the lowest energy element entries for

src/pymatgen/analysis/quasiharmonic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def optimize_gibbs_free_energy(self):
146146
def optimizer(self, temperature):
147147
"""Evaluate G(V, T, P) at the given temperature(and pressure) and minimize it w.r.t. V.
148148
149-
1. Compute the vibrational Helmholtz free energy, A_vib.
149+
1. Compute the vibrational Helmholtz free energy, A_vib.
150150
2. Compute the Gibbs free energy as a function of volume, temperature
151151
and pressure, G(V,T,P).
152152
3. Perform an equation of state fit to get the functional form of
@@ -248,7 +248,7 @@ def debye_temperature(self, volume: float) -> float:
248248
@staticmethod
249249
def debye_integral(y):
250250
"""
251-
Debye integral. Eq(5) in doi.org/10.1016/j.comphy.2003.12.001.
251+
Debye integral. Eq(5) in doi.org/10.1016/j.comphy.2003.12.001.
252252
253253
Args:
254254
y (float): Debye temperature / T, upper limit

src/pymatgen/analysis/structure_matcher.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def are_equal(self, sp1, sp2) -> bool:
5353
definition in Site and PeriodicSite.
5454
5555
Returns:
56-
bool: Whether species are considered equal.
56+
bool: True if species are considered equal.
5757
"""
5858
return False
5959

@@ -122,7 +122,7 @@ def are_equal(self, sp1, sp2) -> bool:
122122
definition in Site and PeriodicSite.
123123
124124
Returns:
125-
bool: Whether species are equal.
125+
bool: True if species are equal.
126126
"""
127127
return sp1 == sp2
128128

@@ -151,7 +151,7 @@ def are_equal(self, sp1, sp2) -> bool:
151151
definition in Site and PeriodicSite.
152152
153153
Returns:
154-
bool: Whether species are equal.
154+
bool: True if species are equal.
155155
"""
156156
for s1 in sp1:
157157
spin1 = getattr(s1, "spin", 0) or 0
@@ -188,7 +188,7 @@ def are_equal(self, sp1, sp2) -> bool:
188188
definition in Site and PeriodicSite.
189189
190190
Returns:
191-
bool: Whether species are the same based on element and amounts.
191+
bool: True if species are the same based on element and amounts.
192192
"""
193193
comp1 = Composition(sp1)
194194
comp2 = Composition(sp2)
@@ -1051,7 +1051,7 @@ def fit_anonymous(
10511051
If True, skip to get a primitive structure and perform Niggli reduction for struct1 and struct2
10521052
10531053
Returns:
1054-
bool: Whether a species mapping can map struct1 to struct2
1054+
bool: True if a species mapping can map struct1 to struct2
10551055
"""
10561056
struct1, struct2 = self._process_species([struct1, struct2])
10571057
struct1, struct2, fu, s1_supercell = self._preprocess(struct1, struct2, niggli, skip_structure_reduction)

0 commit comments

Comments
 (0)