Skip to content

Conversation

mondeja
Copy link
Contributor

@mondeja mondeja commented Aug 20, 2021

I've found myself when developing plugins printing File.src_path, a lot of times, so I've created the reproduction method based on the same defined in Page class.

@ultrabug
Copy link
Member

Do we want to keep using .format for this kind of stuff instead of going straight to f-strings?

I doubt it's being used in logs so I'd rather go for a more modern standard maybe?

@mondeja
Copy link
Contributor Author

mondeja commented Aug 21, 2021

I agree but this should be done for all formatted strings, right? Maybe using pyupgrade f-strings feature? We want to do other upgrades as well and consider adding pyupgrade as part of CI?

@ultrabug
Copy link
Member

I agree but this should be done for all formatted strings, right?

On principle yes, but that's not what I asked because indeed a more general approach would be preferable

Maybe using pyupgrade f-strings feature?

This and black code formatter has been debated but did not get attention at the time. Maybe @oprypin wants to do something on this part? if so, I'm still up for it.

@mondeja mondeja requested a review from ultrabug August 26, 2021 15:59
@ultrabug
Copy link
Member

@oprypin I intend to merge this in two days

@ultrabug ultrabug merged commit 1dc66b7 into mkdocs:master Aug 30, 2021
@mondeja mondeja deleted the File__repr__ branch August 30, 2021 15:30
@mondeja
Copy link
Contributor Author

mondeja commented Oct 11, 2021

Do we want to keep using .format for this kind of stuff instead of going straight to f-strings?

Opened #2612 to replace most of them.

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.

2 participants