Skip to content

Comments

STYLE: Prefer using f-strings#70

Draft
jhlegarreta wants to merge 1 commit intodemianw:masterfrom
jhlegarreta:TransitionTofStrings
Draft

STYLE: Prefer using f-strings#70
jhlegarreta wants to merge 1 commit intodemianw:masterfrom
jhlegarreta:TransitionTofStrings

Conversation

@jhlegarreta
Copy link
Contributor

Prefer using f-strings.

Used the flynt package to convert as many instances as possible, then did a manual pass.

Take advantage of the commit to fix some messages and missing substitutions:

'syntax error in line %s line %d: \n%s\n%s' %
(
    module_name,
    exc_value[1][1],
    formatted_lines[-3],
    formatted_lines[-2]
)

and

raise ValueError(
    "Data in %s does not have the correct number of items")

Documentation:
https://peps.python.org/pep-0498/
https://pypi.org/project/flynt/

Prefer using f-strings.

Used the `flynt` package to convert as many instances as possible, then
did a manual pass.

Take advantage of the commit to fix some messages and missing
substitutions:
```
'syntax error in line %s line %d: \n%s\n%s' %
(
    module_name,
    exc_value[1][1],
    formatted_lines[-3],
    formatted_lines[-2]
)
```

and
```
raise ValueError(
    "Data in %s does not have the correct number of items")
```

Documentation:
https://peps.python.org/pep-0498/
https://pypi.org/project/flynt/
@jhlegarreta
Copy link
Contributor Author

Leaving as a draft until a version is tagged/released based on #67 (comment).

@jhlegarreta jhlegarreta marked this pull request as ready for review December 12, 2024 01:23
@jhlegarreta jhlegarreta marked this pull request as draft December 12, 2024 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant