Skip to content

Commit

Permalink
Fix flake8-import-conventions configuration examples (#1660)
Browse files Browse the repository at this point in the history
  • Loading branch information
diego-pm committed Jan 5, 2023
1 parent 2d23b1a commit e6611c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -2461,9 +2461,10 @@ the `extend_aliases` option.

```toml
[tool.ruff.flake8-import-conventions]
[tool.ruff.flake8-import-conventions.aliases]
# Declare the default aliases.
altair = "alt"
matplotlib.pyplot = "plt"
"matplotlib.pyplot" = "plt"
numpy = "np"
pandas = "pd"
seaborn = "sns"
Expand All @@ -2484,6 +2485,7 @@ will be added to the `aliases` mapping.

```toml
[tool.ruff.flake8-import-conventions]
[tool.ruff.flake8-import-conventions.extend-aliases]
# Declare a custom alias for the `matplotlib` module.
"dask.dataframe" = "dd"
```
Expand Down
4 changes: 3 additions & 1 deletion src/flake8_import_conventions/settings.rs
Expand Up @@ -29,9 +29,10 @@ pub struct Options {
default = r#"{"altair": "alt", "matplotlib.pyplot": "plt", "numpy": "np", "pandas": "pd", "seaborn": "sns"}"#,
value_type = "FxHashMap<String, String>",
example = r#"
[tool.ruff.flake8-import-conventions.aliases]
# Declare the default aliases.
altair = "alt"
matplotlib.pyplot = "plt"
"matplotlib.pyplot" = "plt"
numpy = "np"
pandas = "pd"
seaborn = "sns"
Expand All @@ -44,6 +45,7 @@ pub struct Options {
default = r#"{}"#,
value_type = "FxHashMap<String, String>",
example = r#"
[tool.ruff.flake8-import-conventions.extend-aliases]
# Declare a custom alias for the `matplotlib` module.
"dask.dataframe" = "dd"
"#
Expand Down

0 comments on commit e6611c4

Please sign in to comment.