Project

General

Profile

action #98997

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

Added by VANASTASIADIS 2 months ago. Updated about 2 months 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

History

#1 Updated by okurz 2 months 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.

#2 Updated by VANASTASIADIS 2 months ago

  • Status changed from In Progress to Feedback

#3 Updated by VANASTASIADIS about 2 months 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

Also available in: Atom PDF