Skip to content

fixes wording for a couple of docstrings #269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions diffsync/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def remove_child(self, child: "DiffSyncModel") -> None:


class Adapter: # pylint: disable=too-many-public-methods
"""Class for storing a group of DiffSyncModel instances and diffing/synchronizing to another DiffSync instance."""
"""Class for storing a group of DiffSyncModel instances and diffing/synchronizing to another Adapter instance."""

# In any subclass, you would add mapping of names to specific model classes here:
# modelname1 = MyModelClass1
Expand Down Expand Up @@ -835,7 +835,7 @@ def remove(self, obj: DiffSyncModel, remove_children: bool = False) -> None:
def get_or_instantiate(
self, model: Type[DiffSyncModel], ids: Dict, attrs: Optional[Dict] = None
) -> Tuple[DiffSyncModel, bool]:
"""Attempt to get the object with provided identifiers or instantiate it with provided identifiers and attrs.
"""Attempt to get the object with provided identifiers or instantiate and add it with provided identifiers and attrs.

Args:
model: The DiffSyncModel to get or create.
Expand All @@ -848,7 +848,7 @@ def get_or_instantiate(
return self.store.get_or_instantiate(model=model, ids=ids, attrs=attrs)

def get_or_add_model_instance(self, obj: DiffSyncModel) -> Tuple[DiffSyncModel, bool]:
"""Attempt to get the object with provided obj identifiers or instantiate obj.
"""Attempt to get the object with provided obj identifiers or add obj.

Args:
obj: An obj of the DiffSyncModel to get or add.
Expand Down