Skip to content

Conversation

@zenlyj
Copy link
Contributor

@zenlyj zenlyj commented Nov 2, 2025

Type of Changes

Type
βœ“ πŸ› Bug fix
✨ New feature
πŸ”¨ Refactoring
πŸ“œ Docs

Description

With the addition of the TemplateStr node, a JoinedStr may be a child node of TemplateStr. Before emitting f-string diagnostics, we should ensure that the JoinedStr is not part of a t-string.

Closes #10702

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2025

πŸ€– According to the primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰

This comment was generated for commit 9a74b01

@codecov
Copy link

codecov bot commented Nov 2, 2025

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 95.97%. Comparing base (f8f6ccd) to head (9a74b01).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #10716   +/-   ##
=======================================
  Coverage   95.97%   95.97%           
=======================================
  Files         176      176           
  Lines       19537    19537           
=======================================
  Hits        18750    18750           
  Misses        787      787           
Files with missing lines Coverage Ξ”
pylint/checkers/strings.py 94.29% <100.00%> (ΓΈ)
πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Pierre-Sassoulas Pierre-Sassoulas added False Positive 🦟 A message is emitted but nothing is wrong with the code backport maintenance/4.0.x labels Nov 3, 2025
@Pierre-Sassoulas Pierre-Sassoulas added this to the 4.0.3 milestone Nov 3, 2025
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great !

@Pierre-Sassoulas Pierre-Sassoulas merged commit d2589f1 into pylint-dev:main Nov 3, 2025
48 checks passed
pylint-backport bot pushed a commit that referenced this pull request Nov 3, 2025
… strings when using format spec (#10716)

(cherry picked from commit d2589f1)
Pierre-Sassoulas pushed a commit that referenced this pull request Nov 3, 2025
…-interpolation` with template strings when using format spec (#10717)

Fix false positive for `f-string-without-interpolation` with template strings when using format spec (#10716)

(cherry picked from commit d2589f1)

Co-authored-by: Zen Lee <53538590+zenlyj@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport maintenance/4.0.x False Positive 🦟 A message is emitted but nothing is wrong with the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

f-string-without-interpolation false positive with t-strings when using format spec

3 participants