
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
flake8-import-conventions
Advanced tools
An opinionated plugin for Flake8 on how certain packages should be imported or aliased.
An opinionated plugin for Flake8 on how certain packages should be imported or aliased.
It is based on the pandas-vet
and flake8-2020
plugins.
Via Pipenv:
pipenv install --dev flake8 flake8-import-conventions
Package | Code | Description |
---|---|---|
Altair | IC001 | altair should be imported as import altair as alt |
GeoPandas | IC002 | geopandas should be imported as import geopandas |
Matplotlib | IC003 | matplotlib.pyplot should be imported as import matplotlib.pyplot as plt |
NetworkX | IC004 | networkx should be imported as import networkx as nx |
NumPy | IC005 | numpy should be imported as import numpy as np |
pandas | IC006 | pandas should be imported as import pandas as pd |
Plotly | IC007 | plotly.express should be imported as import plotly.express as px |
Plotly | IC008 | plotly.graph_objects should be imported as import plotly.graph_objects as go |
seaborn | IC009 | seaborn should be imported as import seaborn as sns |
statsmodels | IC010 | statsmodels.api should be imported as import statsmodels.api as sm |
poetry install --with dev
poetry shell
Open the manual_test.py
file in VS Code to see the error messages.
pytest tests/ -v
or (to see print()
s)
pytest tests/ -v -s
Copy the output of the following script and paste it in the Flake8 codes section:
python gen_table.py
If changes are not reflected in VS Code after changing something in the package, close it and open it again.
poetry check
poetry version minor
or
poetry version patch
Commit the change in the pyproject.toml
file.
git tag
git tag "v$(poetry version --short)"
git push origin "v$(poetry version --short)"
FAQs
An opinionated plugin for Flake8 on how certain packages should be imported or aliased.
We found that flake8-import-conventions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.