-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fixed codacy issues part 1 #403
Conversation
6b0c8b2
to
6e4c5c2
Compare
cvat/apps/engine/serializers.py
Outdated
|
||
def to_internal_value(self, data): | ||
@staticmethod | ||
def to_internal_value(data): |
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.
by specification the method should have self. Please find another way to fix the particular issue.
cvat/apps/engine/serializers.py
Outdated
return {'file': data} | ||
|
||
def to_representation(self, instance): | ||
@staticmethod | ||
def to_representation(instance): |
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.
By specification the method should have self. Please find another way to fix the particular issue.
cvat/apps/engine/serializers.py
Outdated
@@ -183,7 +183,8 @@ class Meta: | |||
write_once_fields = ('overlap', 'segment_size', 'image_quality') | |||
ordering = ['-id'] | |||
|
|||
def create(self, validated_data): | |||
@staticmethod | |||
def create(validated_data): |
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.
The same, it is an overloaded method of ModelSerializer. I don't think that we should remove self here.
cvat/apps/engine/serializers.py
Outdated
@@ -203,7 +204,8 @@ def create(self, validated_data): | |||
|
|||
return db_task | |||
|
|||
def update(self, instance, validated_data): | |||
@staticmethod | |||
def update(instance, validated_data): |
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.
Don't remove self here. Need another way to fix the issue.
@bsekachev , please review changes in JS code. |
0cb4783
to
52df974
Compare
52df974
to
bc559ab
Compare
* Start using attribute type in value casting * Update changelog
No description provided.