Skip to content

add type-hints vacancy - #312

Open
DaniilSvinsov wants to merge 26 commits into
devfrom
daniilsvinsov-67
Open

add type-hints vacancy#312
DaniilSvinsov wants to merge 26 commits into
devfrom
daniilsvinsov-67

Conversation

@DaniilSvinsov

Copy link
Copy Markdown
Collaborator

No description provided.

@yakser
yakser self-requested a review February 29, 2024 13:42
@yakser
yakser changed the base branch from master to devFebruary 29, 2024 13:43

@yakseryakser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

тесты упали
линтеры упали
куски кода какие то удалены, как будто случайно половину файлов поудалял

Comment threadvacancy/filters.py Outdated


def project_id_filter(queryset, name, value):
def project_id_filter(queryset, name, value) -> queryset:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

оно точно работает?
кажется тут должен быт QuerySet[Project] или что то такое

Comment threadvacancy/filters.py Outdated
def __init__(self, *args, **kwargs):
"""if is_active filter is not passed, default to True"""
super().__init__(*args, **kwargs)
super().init(*args, **kwargs)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

почему так?

class VacancyResponseDetailSerializer(serializers.ModelSerializer[VacancyResponse]):
user = UserDetailSerializer(many=False, read_only=True)
vacancy = VacancyListSerializer(many=False, read_only=True)
is_approved = serializers.BooleanField(read_only=True)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

почему удалил кусок кода?

Comment threadvacancy/serializers.py Outdated

class VacancyResponseAcceptSerializer(VacancyResponseDetailSerializer):
is_approved = serializers.BooleanField(required=True, read_only=False)
is_approve No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

что это вообще..


class VacancyDetailSerializer(
serializers.ModelSerializer, RequiredSkillsWriteSerializerMixin
serializers.ModelSerializer, RequiredSkillsWriteSerializerMixin[Vacancy]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

неправильный тайпхинт

Comment threadvacancy/serializers.py Outdated


class RequiredSkillsWriteSerializerMixin(RequiredSkillsSerializerMixin):
class RequiredSkillsWriteSerializerMixin(RequiredSkillsSerializerMixin[Project]):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

это миксин, тут не нужен тайпхинт потому что модели разные могут быть

Comment threadvacancy/serializers.py Outdated

class ProjectVacancyListSerializer(
serializers.ModelSerializer, RequiredSkillsSerializerMixin
serializers.ModelSerializer, RequiredSkillsSerializerMixin[Project]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

неправильно

Comment threadvacancy/serializers.py Outdated

class ProjectVacancyCreateListSerializer(
serializers.ModelSerializer, RequiredSkillsWriteSerializerMixin
serializers.ModelSerializer, RequiredSkillsWriteSerializerMixin[Project]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

неправильно

@yakser
yakser self-requested a review April 7, 2024 19:45

@yakseryakser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

как говорится lgtm)

@IgorDuino

Copy link
Copy Markdown
Contributor

Пиши, пожалуйста, более осознанные названия комитов, они потом в общей истории будут

Sign up for freeto 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.

4 participants

@DaniilSvinsov@IgorDuino@yakser@sh1nkey