{"id":13734905,"url":"https://github.com/joaopalmeiro/flake8-import-conventions","last_synced_at":"2025-07-29T15:31:41.361Z","repository":{"id":65734989,"uuid":"346509412","full_name":"joaopalmeiro/flake8-import-conventions","owner":"joaopalmeiro","description":"An opinionated plugin for Flake8 on how certain packages should be imported or aliased.","archived":false,"fork":false,"pushed_at":"2023-10-14T14:34:43.000Z","size":1474,"stargazers_count":8,"open_issues_count":17,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T14:51:10.443Z","etag":null,"topics":["flake8","flake8-plugin"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/flake8-import-conventions/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joaopalmeiro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-10T22:28:28.000Z","updated_at":"2025-02-01T13:31:59.000Z","dependencies_parsed_at":"2024-06-19T03:02:47.138Z","dependency_job_id":"f268a727-6b43-4f33-b76d-9b1ec2901a37","html_url":"https://github.com/joaopalmeiro/flake8-import-conventions","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/joaopalmeiro/flake8-import-conventions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaopalmeiro%2Fflake8-import-conventions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaopalmeiro%2Fflake8-import-conventions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaopalmeiro%2Fflake8-import-conventions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaopalmeiro%2Fflake8-import-conventions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joaopalmeiro","download_url":"https://codeload.github.com/joaopalmeiro/flake8-import-conventions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaopalmeiro%2Fflake8-import-conventions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267709583,"owners_count":24131917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flake8","flake8-plugin"],"created_at":"2024-08-03T03:01:01.051Z","updated_at":"2025-07-29T15:31:40.714Z","avatar_url":"https://github.com/joaopalmeiro.png","language":"Python","funding_links":[],"categories":["Imports"],"sub_categories":[],"readme":"# flake8-import-conventions\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"\" src=\"https://raw.githubusercontent.com/joaopalmeiro/flake8-import-conventions/main/assets/logo_round.png\" width=\"100\" height=\"100\" /\u003e\n\u003c/p\u003e\n\n[![PyPI](https://img.shields.io/pypi/v/flake8-import-conventions.svg)](https://pypi.org/project/flake8-import-conventions/)\n\nAn opinionated plugin for Flake8 on how certain packages should be imported or aliased.\n\nIt is based on the [`pandas-vet`](https://github.com/deppen8/pandas-vet) and [`flake8-2020`](https://github.com/asottile/flake8-2020) plugins.\n\n## Installation\n\nVia [Pipenv](https://pipenv.pypa.io/):\n\n```bash\npipenv install --dev flake8 flake8-import-conventions\n```\n\n## Flake8 codes\n\n| Package                                     | Code  | Description                                                                    |\n| ------------------------------------------- | ----- | ------------------------------------------------------------------------------ |\n| [Altair](https://altair-viz.github.io/)     | IC001 | altair should be imported as `import altair as alt`                            |\n| [GeoPandas](https://geopandas.org/)         | IC002 | geopandas should be imported as `import geopandas`                             |\n| [Matplotlib](https://matplotlib.org/)       | IC003 | matplotlib.pyplot should be imported as `import matplotlib.pyplot as plt`      |\n| [NetworkX](https://networkx.org/)           | IC004 | networkx should be imported as `import networkx as nx`                         |\n| [NumPy](https://numpy.org/)                 | IC005 | numpy should be imported as `import numpy as np`                               |\n| [pandas](https://pandas.pydata.org/)        | IC006 | pandas should be imported as `import pandas as pd`                             |\n| [Plotly](https://plotly.com/python/)        | IC007 | plotly.express should be imported as `import plotly.express as px`             |\n| [Plotly](https://plotly.com/python/)        | IC008 | plotly.graph_objects should be imported as `import plotly.graph_objects as go` |\n| [seaborn](https://seaborn.pydata.org/)      | IC009 | seaborn should be imported as `import seaborn as sns`                          |\n| [statsmodels](https://www.statsmodels.org/) | IC010 | statsmodels.api should be imported as `import statsmodels.api as sm`           |\n\n## Development\n\n```bash\npoetry install --with dev\n```\n\n```bash\npoetry shell\n```\n\nOpen the `manual_test.py` file in VS Code to see the error messages.\n\n```bash\npytest tests/ -v\n```\n\nor (to see `print()`s)\n\n```bash\npytest tests/ -v -s\n```\n\nCopy the output of the following script and paste it in the [Flake8 codes](#flake8-codes) section:\n\n```bash\npython gen_table.py\n```\n\nIf changes are not reflected in VS Code after changing something in the package, close it and open it again.\n\n## Deployment\n\n```bash\npoetry check\n```\n\n```bash\npoetry version minor\n```\n\nor\n\n```bash\npoetry version patch\n```\n\nCommit the change in the `pyproject.toml` file.\n\n```bash\ngit tag\n```\n\n```bash\ngit tag \"v$(poetry version --short)\"\n```\n\n```bash\ngit push origin \"v$(poetry version --short)\"\n```\n\n## References\n\n- Anthony Sottile's \"[a flake8 plugin from scratch (intermediate) anthony explains #025](https://youtu.be/ot5Z4KQPBL8)\" tutorial.\n- [flake8-pie](https://github.com/sbdchd/flake8-pie).\n- [wemake-python-styleguide](https://github.com/wemake-services/wemake-python-styleguide).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaopalmeiro%2Fflake8-import-conventions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoaopalmeiro%2Fflake8-import-conventions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaopalmeiro%2Fflake8-import-conventions/lists"}