Skip to content

[PyCon.de sprints] Fix various pylint finds - #2518

Open
snordhausen wants to merge 6 commits into
conda-forge:mainfrom
snordhausen:pylint-finds
Open

[PyCon.de sprints] Fix various pylint finds#2518
snordhausen wants to merge 6 commits into
conda-forge:mainfrom
snordhausen:pylint-finds

Conversation

@snordhausen

@snordhausen snordhausen commented Apr 13, 2026

Copy link
Copy Markdown

Remove re-imports, unused variables, implicit string concatenation, overly complex assignment.

Checklist

  • Added a news entry
  • Regenerated schema JSON if schema altered (python -m conda_smithy.schema)

Stefan Nordhausen added 2 commits April 13, 2026 12:10
Remove re-imports, unused variables, implicit string
concatenation, overly complex assignment.
@snordhausen snordhausen changed the title Fix various pylint finds [PyCon.de sprints] Fix various pylint finds Apr 13, 2026

@jaimergp jaimergp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! Just one little change about those imports. We are already importing a few things from vsts so no need to keep any inlined.

Comment thread conda_smithy/azure_ci_utils.py Outdated
Comment thread news/2518-pylint-finds.rst Outdated
@jaimergp
jaimergp marked this pull request as ready for review April 13, 2026 12:31
@jaimergp
jaimergp requested a review from a team as a code owner April 13, 2026 12:31
@dbast

dbast commented Apr 13, 2026

Copy link
Copy Markdown
Member

Can the pylint rules which found those things be activated via the rules list at https://github.com/conda-forge/conda-smithy/blob/main/pyproject.toml#L46?

@snordhausen

Copy link
Copy Markdown
Author

@dbast I'll look into that and include the rules for #2520, too.

@snordhausen

Copy link
Copy Markdown
Author

@dbast
For unused variables that are created as part of a loop, theres B007`. But that rule will require some additional changes, so I'll put it into a separate PR once this one is merged.

For the re-imports, pylint's W0404 (reimported) seems to have no ruff equivalent. There's only PLC0415 for imports not at the top level. But this is actually used a lot in cli.py (I assume to emulate lazy loading).

For the .format() calls that should have been f-strings in #2520, I checked with some other sprint participants and ruff seems to have no rule to catch those specific cases.

So in summary, ruff seems to be missing some rules to catch these specific issues that were detected by pylint.

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.

3 participants