Project

General

Profile

Actions

action #98997

closed

[tools] [smelt] [python3.6] Replace all older text formatting with f-strings

Added by VANASTASIADIS about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
Start date:
2021-09-21
Due date:
2021-10-05
% Done:

0%

Estimated time:

Description

User story

The python linter now gives warnings against the use of the old .format() method of formatting strings, proposing the use of f-strings, as they are faster and more readable. This has caused the smelt pipelines to fail. Instead of removing the warning, it's a better idea to use f-strings where applicable.

Related ticket: https://gitlab.suse.de/tools/smelt/-/issues/730

Acceptance criteria

  • AC1: All uses of the old formatting method that make sense to be replaced by f-strings are replaced
  • AC2: The SMELT pipelines pass without pylint failing due to consider-f-strings warning

Tasks

  • see failing pipeline results for places to switch to f-strings (i.e. https://gitlab.suse.de/tools/smelt/-/jobs/595135)
  • replace .format() occurrences with f-strings, consider the best way to accurately do so so that the behaviour doesn't change

Further details

Open mr at https://gitlab.suse.de/tools/smelt/-/merge_requests/782

Actions #1

Updated by okurz about 3 years ago

  • Due date changed from 2021-09-22 to 2021-10-05

We commonly apply a due-date in a bit more conservative manner. By default 14 days after a ticket was picked up. Also keep in mind that we receive an alert as soon as the due-date is met. So please try to have tickets resolved at the latest one day before the due date meaning that the due-date should be selected as least that far in the future. Hence I updated the due-date.

Actions #2

Updated by VANASTASIADIS about 3 years ago

  • Status changed from In Progress to Feedback
Actions #3

Updated by VANASTASIADIS about 3 years ago

  • Status changed from Feedback to Resolved

mr is resolved and the changes are merged in https://gitlab.suse.de/tools/smelt. Resolving this issue

Actions

Also available in: Atom PDF