Skip to content

Conversation

@Flamefire
Copy link

@Flamefire Flamefire commented Jan 6, 2026

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

Fix regression in 6ce6032:
In __init__ the options are not parsed yet and hence will always be the defaults.

Closes #10801

I was looking for a way to avoid this in general. However that requires a bit more refactoring to either:

  • Don't set PyLinter.options on __init__.py to detect access to it before being set (from config)
  • (Preferred): Don't init plugins until options are parsed. Registering would register the classes instead of the instances

Fix regression in 6ce6032:
In `__init__` the options are not parsed yet and hence will always be
the defaults.
@Flamefire
Copy link
Author

Hm towncrier create <IssueNumber>.<type> does create a file with .rst extension which the linter doesn't like. I'd consider it more useful to have the .rst extension to make it easier for editors to understand the format.

DanielNoord
DanielNoord previously approved these changes Jan 6, 2026
Copy link
Collaborator

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

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

Thanks! That's a stupid regression for me to make...

@DanielNoord
Copy link
Collaborator

Seems there are some small things we'll need to fix

@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 95.98%. Comparing base (4f6c241) to head (e1193f4).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #10802   +/-   ##
=======================================
  Coverage   95.98%   95.98%           
=======================================
  Files         176      176           
  Lines       19564    19566    +2     
=======================================
+ Hits        18779    18781    +2     
  Misses        785      785           
Files with missing lines Coverage Ξ”
pylint/checkers/imports.py 94.90% <100.00%> (+0.02%) ⬆️
πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

This comment has been minimized.

DanielNoord
DanielNoord previously approved these changes Jan 8, 2026
@DanielNoord
Copy link
Collaborator

@Flamefire There is unfortunately still a lint failure

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

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

This comment was generated for commit e1193f4

With the fix of honoring the config the import is now correctly
identified using the overwrite `known-standard-library=_string`
@Flamefire
Copy link
Author

@Flamefire There is unfortunately still a lint failure

That is actually in a file I didn't touch. What happened:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Options for wrong-import order ignored

2 participants