Skip to content

Conversation

darya-shynkevich
Copy link
Contributor

closes #95

Copy link
Owner

@makridenko makridenko left a comment

Choose a reason for hiding this comment

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

Let's also add a badge :)

"flake8-type-checking==3.0.0",
"flake8-class-attributes-order==0.3.0",
"flake8-simplify==0.21.0"
"wemake-python-styleguide==1.3.0"
Copy link
Owner

Choose a reason for hiding this comment

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

why you removed all dependencies?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I though everything is included into wemake-python-styleguid, will double check

@@ -12,7 +12,7 @@ class BaseClientMeta(ABCMeta):
specific attributes).
"""

pass
__slots__ = ()
Copy link
Owner

Choose a reason for hiding this comment

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

why do we need it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was a workaround because wemake-python-styleguide thinks empty classes are bad. I will remove it and ignore the error

for _id in ids:
result.append(self._cache_data.pop(_id))
deleted_records = []
for id_ in ids:
Copy link
Owner

Choose a reason for hiding this comment

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

hm, id_ is not very pythonic
maybe we can use identifier, opinions?
or maybe another name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree

@@ -41,7 +41,7 @@ class ModelMetaclass(PydanticModelMetaclass):
"""

def __new__(mcs, name, bases, namespace):
cls = super().__new__(mcs, name, bases, namespace)
target_cls = super().__new__(mcs, name, bases, namespace)
Copy link
Owner

Choose a reason for hiding this comment

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

I guess it's better to name new_cls

@@ -105,7 +105,7 @@ def save(self: _M) -> _M:
data returned from the database after the save operation.

Returns:
(_M): The saved model instance, updated with data from the database (e.g.,
(_Model): The saved model instance, updated with data from the database (e.g.,
Copy link
Owner

Choose a reason for hiding this comment

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

why _Model?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it complained that _M is too short... Initially I tought to change _M to _Model yet then decided to suppress the error since it does not make a lot of sense. WDYT?

Copy link
Owner

Choose a reason for hiding this comment

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

@darya-shynkevich but it seems that you change it only in docstring, we can change it but everywhere

@@ -21,7 +22,7 @@ def test_delete(self, supabase_client: SupabaseClient, httpx_mock: 'HTTPXMock'):
httpx_mock.add_response(
method="DELETE",
url=httpx.URL('https://test.supabase.co/rest/v1/table_name', params={'id': 'eq.1', 'title': 'neq.test'}),
status_code=200,
status_code=HTTPStatus.OK,
Copy link
Owner

Choose a reason for hiding this comment

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

hm, is there are any other constants?
like HTTP_200_OK or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, it complained about magic numbers a lot, yet I think that it is ok to use magic numbers in tests, so I change 200 to HTTPStatus.OK because it make sense and left all other places untouched.

Copy link
Owner

Choose a reason for hiding this comment

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

@darya-shynkevich no, HTTPStatus is better than magic numbers, keep it like this

@makridenko
Copy link
Owner

@darya-shynkevich I've been a bit busy, sorry, are you still in?

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.

try to add wemake-python-styleguide
2 participants