-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add support for isort option --known-first-party
#10803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Fix regression in 6ce6032: In `__init__` the options are not parsed yet and hence will always be the defaults.
4852254 to
bd160ae
Compare
bd160ae to
070dac1
Compare
--known-first-party
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10803 +/- ##
=======================================
Coverage 95.98% 95.98%
=======================================
Files 176 176
Lines 19564 19567 +3
=======================================
+ Hits 18779 18782 +3
Misses 785 785
🚀 New features to boost your workflow:
|
DanielNoord
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Pierre-Sassoulas Is this option something we want to add?
This comment has been minimized.
This comment has been minimized.
f161aa6 to
288f0f7
Compare
270b3bd to
710916d
Compare
|
Motivation for me was that we have a project that uses a Rather than doing a large-scale refactoring adding this exception is the easiest way out. It would be even better if PyLint would understand the |
|
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉 This comment was generated for commit 710916d |
With the fix of honoring the config the import is now correctly identified using the overwrite `known-standard-library=_string`
Similar to known-third-party this recognizes modules as first party modules.
710916d to
ceba49f
Compare
Type of Changes
Description
Add support for
--known-first-partysimilar to--known-third-party:Force import order to recognize a module as part of a first party library.
Based on #10802 as otherwise tests would fail