lablup / lablup/backend.ai

Enable UP031: Convert % formatting to f-string

Open
#8,324 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

## Rule

**UP031**: `printf-string-formatting`

## Purpose

Convert legacy printf-style % string formatting to modern f-strings.

## Example

```python
# Before
name = "world"
message = "Hello, %s!" % name

# After
name = "world"
message = f"Hello, {name}!"
```

## Auto-fix

✅ Available

## Notes

- Part of Python 3.12 modernization effort
- f-strings are more readable and often faster
- Backend.AI uses BraceStyleAdapter for logging, so this doesn't conflict

JIRA Issue: BA-4025

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.