Skip to content

Commit 205f6cf

Browse files
pre-commit auto-fixes
1 parent 47869a7 commit 205f6cf

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

pymatgen/transformations/standard_transformations.py

+4-11
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,7 @@ def inverse(self):
503503

504504

505505
class RandomStructureTransformation(AbstractTransformation):
506-
"""
507-
Transform a disordered structure into a given number of ordered random structures.
508-
"""
506+
"""Transform a disordered structure into a given number of ordered random structures."""
509507

510508
def __init__(self):
511509
pass
@@ -520,7 +518,7 @@ def apply_transformation(self, structure: Structure, n_copies: int) -> list[Stru
520518
n_copies (int): number of copies of ordered random structures to be returned
521519
522520
Returns:
523-
A list of ordered random structures based on the input disordered structure.
521+
A list of ordered random structures based on the input disordered structure.
524522
"""
525523
subl = structure.sublattices
526524

@@ -551,16 +549,12 @@ def apply_transformation(self, structure: Structure, n_copies: int) -> list[Stru
551549

552550
@property
553551
def inverse(self):
554-
"""
555-
Returns: None
556-
"""
552+
"""Returns: None."""
557553
return
558554

559555
@property
560556
def is_one_to_many(self) -> bool:
561-
"""
562-
Returns: True
563-
"""
557+
"""Returns: True."""
564558
return True
565559

566560
def random_assign(self, sequence: list[int], lengths: list[int]):
@@ -591,7 +585,6 @@ def random_assign(self, sequence: list[int], lengths: list[int]):
591585
start_pos = 0
592586

593587
for length in lengths:
594-
595588
end_pos = min(start_pos + length, len(sequence))
596589

597590
## check if end_pos is greater than start_pos

0 commit comments

Comments
 (0)