Skip to content

Commit

Permalink
chore: run lint fix and types
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed Sep 9, 2024
1 parent 60e8b69 commit 35f40f4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/py/mat3ra/made/tools/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from scipy.spatial import cKDTree

from ..material import Material
from .enums import SurfaceTypes
from .convert import decorator_convert_material_args_kwargs_to_atoms, to_pymatgen
from .enums import SurfaceTypes
from .third_party import ASEAtoms, PymatgenIStructure, PymatgenVoronoiNN
from .utils import decorator_handle_periodic_boundary_conditions

Expand Down
10 changes: 8 additions & 2 deletions src/py/mat3ra/made/tools/build/passivation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@

from mat3ra.made.material import Material
from .configuration import PassivationConfiguration
from .builders import SurfacePassivationBuilder, UndercoordinationPassivationBuilder
from .builders import (
SurfacePassivationBuilder,
UndercoordinationPassivationBuilder,
SurfacePassivationBuilderParameters,
)


def create_passivation(
configuration: PassivationConfiguration,
builder: Union[SurfacePassivationBuilder, UndercoordinationPassivationBuilder] = SurfacePassivationBuilder(),
builder: Union[SurfacePassivationBuilder, UndercoordinationPassivationBuilder, None] = None,
) -> Material:
if builder is None:
builder = SurfacePassivationBuilder(build_parameters=SurfacePassivationBuilderParameters())
return builder.get_material(configuration)
5 changes: 3 additions & 2 deletions src/py/mat3ra/made/tools/build/passivation/builders.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional
from typing import List

import numpy as np
from mat3ra.made.material import Material
Expand Down Expand Up @@ -77,7 +77,8 @@ class SurfacePassivationBuilder(PassivationBuilder):
Detects surface atoms looking along Z axis and passivates either the top or bottom surface or both.
"""

build_parameters: Optional[SurfacePassivationBuilderParameters] = SurfacePassivationBuilderParameters()
build_parameters: SurfacePassivationBuilderParameters
_DefaultBuildParameters = SurfacePassivationBuilderParameters()
_ConfigurationType = PassivationConfiguration

def create_passivated_material(self, configuration: PassivationConfiguration) -> Material:
Expand Down

0 comments on commit 35f40f4

Please sign in to comment.