-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
First of all, I'd like to thank you for this great tool. It saved me a lot time! The tool correctly converted most of the f-strings but left one case as below.
Environment:
macOS Sequoia 15.5
Python 3.10.18
printf-log-formatter 0.3.0
Reproducing steps:
- Save the following code as
test.py.
import logging
logger = logging.getLogger(__name__)
dir_name = 'some_dir'
dir_path = '/full/path/to/some_dir'
exists = False
logger.info(f" {dir_name}: {dir_path} {'✓' if exists else '✗'}")
- Run
printf-log-formatter test.py --log-level info. The output will be as below:
Failed to parse `test.py` line 9. Please open an issue at https://github.com/sondrelg/printf-log-formatter/issues/new
- If I remove the complex statement from the last line and change it into below, the tool will work correctly:
logger.info(f" {dir_name}: {dir_path}")
Metadata
Metadata
Assignees
Labels
No labels