-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Implement import conventions #1098
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
Merged
charliermarsh
merged 17 commits into
astral-sh:main
from
edgarrmondragon:1004-import-conventions
Dec 6, 2022
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
7fb4a82
Implement import conventions
edgarrmondragon f5e01bf
Make clippy happy
edgarrmondragon ad782c9
Update readme
edgarrmondragon 309e9d6
Generate options docs
edgarrmondragon af78b50
Use dask imports in tests and examples
edgarrmondragon f35394c
Merge default alias conventions with config
edgarrmondragon 3863fe0
Rename `IC` -> `ICN`
edgarrmondragon 08763e7
Make clippy happy
edgarrmondragon 35277d3
Add entry for `cargo dev generate-options` in CONTRIBUTING.md
edgarrmondragon 5a6223f
Merge `aliases` and `extend-aliases` values
edgarrmondragon 47d7752
Take value; tweak default
charliermarsh 3e63982
ICO to ICN
charliermarsh 2c2a71c
Pass Option<&str>
charliermarsh fcb8acd
Remove duplicate header
charliermarsh 946ae19
Use a BTreeMap for its stable hash; fewer clones
charliermarsh 9d6db89
Tweak comment
charliermarsh 2ab48c3
Remove prefix from test files
charliermarsh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
resources/test/fixtures/flake8_import_conventions/custom.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import math # not checked | ||
|
|
||
| import altair # unconventional | ||
| import dask.array # unconventional | ||
| import dask.dataframe # unconventional | ||
| import matplotlib.pyplot # unconventional | ||
| import numpy # unconventional | ||
| import pandas # unconventional | ||
| import seaborn # unconventional | ||
|
|
||
| import altair as altr # unconventional | ||
| import matplotlib.pyplot as plot # unconventional | ||
| import dask.array as darray # unconventional | ||
| import dask.dataframe as ddf # unconventional | ||
| import numpy as nmp # unconventional | ||
| import pandas as pdas # unconventional | ||
| import seaborn as sbrn # unconventional | ||
|
|
||
| import altair as alt # conventional | ||
| import dask.array as da # conventional | ||
| import dask.dataframe as dd # conventional | ||
| import matplotlib.pyplot as plt # conventional | ||
| import numpy as np # conventional | ||
| import pandas as pd # conventional | ||
| import seaborn as sns # conventional |
19 changes: 19 additions & 0 deletions
19
resources/test/fixtures/flake8_import_conventions/defaults.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import math # not checked | ||
|
|
||
| import altair # unconventional | ||
| import matplotlib.pyplot # unconventional | ||
| import numpy # unconventional | ||
| import pandas # unconventional | ||
| import seaborn # unconventional | ||
|
|
||
| import altair as altr # unconventional | ||
| import matplotlib.pyplot as plot # unconventional | ||
| import numpy as nmp # unconventional | ||
| import pandas as pdas # unconventional | ||
| import seaborn as sbrn # unconventional | ||
|
|
||
| import altair as alt # conventional | ||
| import matplotlib.pyplot as plt # conventional | ||
| import numpy as np # conventional | ||
| import pandas as pd # conventional | ||
| import seaborn as sns # conventional |
19 changes: 19 additions & 0 deletions
19
resources/test/fixtures/flake8_import_conventions/override_default.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import math # not checked | ||
|
|
||
| import altair # unconventional | ||
| import matplotlib.pyplot # unconventional | ||
| import numpy # unconventional | ||
| import pandas # unconventional | ||
| import seaborn # unconventional | ||
|
|
||
| import altair as altr # unconventional | ||
| import matplotlib.pyplot as plot # unconventional | ||
| import numpy as np # unconventional | ||
| import pandas as pdas # unconventional | ||
| import seaborn as sbrn # unconventional | ||
|
|
||
| import altair as alt # conventional | ||
| import matplotlib.pyplot as plt # conventional | ||
| import numpy as nmp # conventional | ||
| import pandas as pd # conventional | ||
| import seaborn as sns # conventional |
19 changes: 19 additions & 0 deletions
19
resources/test/fixtures/flake8_import_conventions/remove_default.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import math # not checked | ||
|
|
||
| import altair # unconventional | ||
| import matplotlib.pyplot # unconventional | ||
| import numpy # not checked | ||
| import pandas # unconventional | ||
| import seaborn # unconventional | ||
|
|
||
| import altair as altr # unconventional | ||
| import matplotlib.pyplot as plot # unconventional | ||
| import numpy as nmp # not checked | ||
| import pandas as pdas # unconventional | ||
| import seaborn as sbrn # unconventional | ||
|
|
||
| import altair as alt # conventional | ||
| import matplotlib.pyplot as plt # conventional | ||
| import numpy as np # not checked | ||
| import pandas as pd # conventional | ||
| import seaborn as sns # conventional |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.