Summary
unconventional-import-alias (ICN001) and possibly banned-import-alias (ICN002) are missing some conventions enforced by the upstream flake8-import-conventions.
For ICN001, plotly.graph_objects should be imported as go and statsmodels.api should be imported as sm.
For ICN002, geopandas should not be imported as gpd. Actually, flake8-import-conventions enforces that it not be aliased at all, but Ruff doesn’t support that. The specific alias that prompted the upstream rule is gpd, banning which is the closest Ruff can get.
Example:
$ cat >icn.py <<'# EOF'
import geopandas as gpd
import plotly.graph_objects
import statsmodels.api
# EOF
$ ruff --isolated check icn.py --select ICN001,ICN002
All checks passed!
$ flake8 --select IC icn.py
icn.py:1:1: IC002 geopandas should be imported as `import geopandas`
icn.py:2:1: IC008 plotly.graph_objects should be imported as `import plotly.graph_objects as go`
icn.py:3:1: IC010 statsmodels.api should be imported as `import statsmodels.api as sm`
Version
ruff 0.14.3 (8737a2d 2025-10-30)
Summary
unconventional-import-alias(ICN001) and possiblybanned-import-alias(ICN002) are missing some conventions enforced by the upstream flake8-import-conventions.For ICN001,
plotly.graph_objectsshould be imported asgoandstatsmodels.apishould be imported assm.For ICN002,
geopandasshould not be imported asgpd. Actually, flake8-import-conventions enforces that it not be aliased at all, but Ruff doesn’t support that. The specific alias that prompted the upstream rule isgpd, banning which is the closest Ruff can get.Example:
Version
ruff 0.14.3 (8737a2d 2025-10-30)