Skip to content

Some f-strings are missing the f #1224

@mbyrnepr2

Description

@mbyrnepr2

Is there an existing issue for this?

  • I have searched the existing issues (open and closed), and could not find an existing issue

What keywords did you use to search existing issues?

f-string

What operating system are you using?

macOS

If you selected 'Other', describe your Operating System here

No response

What version of Python are you running?

Python 3.12.6

How did you install twine? Did you use your operating system's package manager or pip or something else?

python -m pip install twine

What version of twine do you have installed (include the complete output)

twine version 0.1.dev1312+gaa3a910 (keyring: 24.1.1, packaging: 24.2, requests: 2.32.3, requests-toolbelt: 1.0.0, urllib3: 2.2.2, id: 1.5.0)

Which package repository are you using?

pypi

Please describe the issue that you are experiencing

Hi folks,

While running various twine commands (e.g. check or publish) I see the filename missing from the error message. For example:

Message:

Checking my_sdist.tar.gz: ERROR    InvalidDistribution: Too many top-level members in sdist archive: {self.filename} 

This happens because there is a missing f in the sdist.py module.
There are also a couple of other occurrences of a missing f; I've reflected those in unit tests I've written in the attached PR.

Please list the steps required to reproduce this behaviour

1. python -m pip install twine
2. manufacture an sdist that happens to contain 2 files:
    tar czf my_sdist.tar.gz my_project some_other_file
python -m twine check --strict my_sdist.tar.gz

Anything else you'd like to mention?

Thank you for all you do for Python. Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions