Skip to content

Conversation

@vincentsarago
Copy link
Member

This PR updates pre-commit and switch to ruff for formatting/linting (as we did in stac-fastapi)

settings=settings,
extensions=extensions,
client=CoreCrudClient(post_request_model=post_request_model),
client=CoreCrudClient(post_request_model=post_request_model), # type: ignore
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why I was getting a Mypy error here 🤷

collection_id=collection_id,
item_id=item_id,
collection_id=collection_id, # type: ignore
item_id=item_id, # type: ignore
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

collection_id and item_id should always be define but for some reason mypy thinks it can be None



async def dbfunc(conn: Connection, func: str, arg: Union[str, Dict]):
async def dbfunc(conn: Connection, func: str, arg: Union[str, Dict, List]):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix

"rel": Relations.self.value,
"type": MimeTypes.json.value,
"href": self.url,
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: using dict() is slower than constructing a dict using {}

"""Transactions extension specific CRUD operations."""

def _validate_id(self, id: str, settings: Settings) -> bool:
def _validate_id(self, id: str, settings: Settings):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no return on this function

is_coll_from_list_valid = False
single_coll_mocked_link = dict()

single_coll_mocked_link: Optional[pystac.Collection] = None
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

single_coll_mocked_link can't be a dict but has to be a Collection object

@vincentsarago vincentsarago requested a review from jonhealy1 April 23, 2024 15:55
@jonhealy1
Copy link
Collaborator

@vincentsarago changelog?

@vincentsarago
Copy link
Member Author

@jonhealy1 I'll wait for #101 to get merged

then I'll merge this one to main and then we can do #106

@vincentsarago vincentsarago merged commit 46a28ee into main Apr 25, 2024
@vincentsarago vincentsarago deleted the feature/update-linter branch April 25, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants