New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

flake8-import-conventions

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flake8-import-conventions

An opinionated plugin for Flake8 on how certain packages should be imported or aliased.

  • 0.1.0
  • PyPI
  • Socket score

Maintainers
1

flake8-import-conventions

PyPI

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.

Installation

Via Pipenv:

pipenv install --dev flake8 flake8-import-conventions

Flake8 codes

PackageCodeDescription
AltairIC001altair should be imported as import altair as alt
GeoPandasIC002geopandas should be imported as import geopandas
MatplotlibIC003matplotlib.pyplot should be imported as import matplotlib.pyplot as plt
NetworkXIC004networkx should be imported as import networkx as nx
NumPyIC005numpy should be imported as import numpy as np
pandasIC006pandas should be imported as import pandas as pd
PlotlyIC007plotly.express should be imported as import plotly.express as px
PlotlyIC008plotly.graph_objects should be imported as import plotly.graph_objects as go
seabornIC009seaborn should be imported as import seaborn as sns
statsmodelsIC010statsmodels.api should be imported as import statsmodels.api as sm

Development

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.

Deployment

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)"

References

Keywords

FAQs


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc