Skip to content

Commit

Permalink
typo/linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmshn committed Aug 15, 2022
1 parent 0bad274 commit 6aac95b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions pymatgen/analysis/defects/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ def generate_defects(self) -> Iterable[Defect]:
class SubstitutionGenerator(DefectGenerator):
"""Generate substitution for symmetry distinct sites in a structure."""

def __init__(self, structure: Structure, substitutions: dict[str, str]):
def __init__(self, structure: Structure, substitution: dict[str, str]):
"""Initialize a substitution generator.
Args:
structure: The bulk structure the vacancies are generated from.
substitutions: The substitutions to be made given as a dictionary.
substitution: The substitutions to be made given as a dictionary.
e.g. {"Mg": "Ga"} means that Mg is substituted on the Ga site.
"""
super().__init__(structure)
self.substitutions = substitutions
self.substitution = substitution

def generate_defects(self) -> Iterable[Defect]:
"""Generate the substitution objects."""
Expand All @@ -89,9 +89,9 @@ def generate_defects(self) -> Iterable[Defect]:
for site_group in sym_struct.equivalent_sites:
site = site_group[0]
el_str = element_str(site.specie)
if el_str not in self.substitutions.keys():
if el_str not in self.substitution.keys():
continue
new_element = self.substitutions[el_str]
new_element = self.substitution[el_str]
sub_site = PeriodicSite(
Species(new_element),
site.frac_coords,
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ line-length = 88

[tool.flake8]
extend-ignore = "E203, W503, E501, F401, RST21"
max-line-length = 88
max-doc-length = 88
max-line-length = 120
max-doc-length = 120
min-python-version = "3.8.0"
rst-roles = "class, func, ref, obj"
select = "C, E, F, W, B, B950"
Expand Down

0 comments on commit 6aac95b

Please sign in to comment.