Skip to content
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

Merged
merged 7 commits into from
Apr 17, 2019
Merged

Fixed codacy issues part 1 #403

merged 7 commits into from
Apr 17, 2019

Conversation

azhavoro
Copy link
Contributor

No description provided.

@azhavoro azhavoro requested review from nmanovic and bsekachev and removed request for nmanovic April 16, 2019 14:24
@azhavoro azhavoro changed the title WIP Do not merge please Fixed codacy issues part 1 Apr 16, 2019

def to_internal_value(self, data):
@staticmethod
def to_internal_value(data):
Copy link
Contributor

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.

return {'file': data}

def to_representation(self, instance):
@staticmethod
def to_representation(instance):
Copy link
Contributor

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.

@@ -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):
Copy link
Contributor

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.

@@ -203,7 +204,8 @@ def create(self, validated_data):

return db_task

def update(self, instance, validated_data):
@staticmethod
def update(instance, validated_data):
Copy link
Contributor

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.

@nmanovic
Copy link
Contributor

@bsekachev , please review changes in JS code.

@nmanovic nmanovic merged commit 667e311 into nm/rest_api Apr 17, 2019
@nmanovic nmanovic deleted the az/fix_codacy_issues branch April 17, 2019 18:34
TOsmanov pushed a commit to TOsmanov/cvat that referenced this pull request Aug 23, 2021
* Start using attribute type in value casting

* Update changelog
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