-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add ruff code formatting and linting github action #170
Conversation
@ceesem this is another option https://pre-commit.com/ |
and v is not None | ||
and a.metadata.get("is_bbox", False) == False | ||
and a.metadata.get("is_meta", False) == False | ||
and a.metadata.get("is_bbox", False) == False # noqa E712 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could just fix these... but unsure whether this get could return a string, and then things get weird... so i opted to just tell it to shut up for these, and hopefully in the future we can just follow the linting
@@ -78,10 +79,9 @@ def get_all_view_metadata(client): | |||
def is_list_like(x): | |||
if isinstance(x, str): | |||
return False | |||
try: | |||
len(x) | |||
if hasattr(x, "__len__"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be the same functionality but happy to change it back and noqa it if anyone is concerned
@@ -18,7 +20,7 @@ class TestInfoClient: | |||
|
|||
@responses.activate | |||
def test_infoclient(self, myclient, mocker): | |||
endpoint_mapping = self.default_mapping | |||
endpoint_mapping = self.default_mapping # noqa F841 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ceesem this is giving F841 Local variable
endpoint_mapping is assigned to but never used
but i opted to leave it because of what we just discussed w pytest. lmk if you think this is really not used, though
see #169
this adds a formatting enforcement test to the build on pull or push to master