Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
noliveleger committed Sep 18, 2024
1 parent 7d4edb0 commit 1098de0
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions kobo/apps/subsequences/actions/keyword_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def check_submission_status(self, submission):
response = self._traverse_object(submission, source)
except KeyError:
continue
# FIXME QPATH

xpath = source.split('/')[0]
all_output = submission[xpath].setdefault(self.ID, [])
this_output = self._get_matching_element(all_output, **query)
Expand All @@ -92,7 +92,7 @@ def run_change(self, submission):
matches = 0
for keyword in query['keywords']:
matches += response['value'].count(keyword)
# FIXME QPATH

xpath = source.split('/')[0]
all_output = submission[xpath].setdefault(self.ID, [])
this_output = self._get_matching_element(all_output, **query)
Expand Down
1 change: 0 additions & 1 deletion kobo/apps/subsequences/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ def stream_with_extras(submission_stream, asset):
uuid = submission['_uuid']

all_supplemental_details = deepcopy(extras.get(uuid, {}))
# FIXME QPATH
for supplemental_details in all_supplemental_details.values():
try:
all_qual_responses = supplemental_details['qual']
Expand Down
3 changes: 0 additions & 3 deletions kobo/apps/subsequences/utils/parse_known_cols.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@
def extend_col_deets(lang: str, coltype: str, label: str, xpath: str) -> dict:
# NB: refer to commit d013bfe0f5 when trying to figure out the original
# intent here
name = xpath.split('/')[-1]
out = {
'label': name,
'dtpath': f'{xpath}/{coltype}_{lang}',
'type': coltype,
'language': lang,
'label': f'{label} - {coltype}',
'name': f'{xpath}/{coltype}_{lang}',
'source': xpath,
# FIXME QPATH
'xpath': f'{xpath}/{coltype}/{lang}',
'settings': {'mode': 'manual', 'engine': f'engines/{coltype}_manual'},
'path': [xpath, coltype],
Expand Down
1 change: 1 addition & 0 deletions kpi/models/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
from kpi.utils.object_permission import get_cached_code_names
from kpi.utils.sluggify import sluggify_label


class AssetDeploymentStatus(models.TextChoices):

ARCHIVED = 'archived', 'Archived'
Expand Down
3 changes: 0 additions & 3 deletions kpi/serializers/v2/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,9 +689,6 @@ def get_permissions(self, obj):
queryset.all(), many=True, read_only=True, context=context
).data

def get_project_ownership(self, asset) -> Optional[dict]:
pass

def get_project_ownership(self, asset) -> Optional[dict]:
if not (transfer := asset.transfers.order_by('-date_created').first()):
return
Expand Down

0 comments on commit 1098de0

Please sign in to comment.