{"id":22323513,"url":"https://github.com/joaopalmeiro/flake8-import-as-module","last_synced_at":"2025-10-23T20:52:19.607Z","repository":{"id":65791852,"uuid":"599272664","full_name":"joaopalmeiro/flake8-import-as-module","owner":"joaopalmeiro","description":"A Flake8 plugin to check if specific packages are imported as modules.","archived":false,"fork":false,"pushed_at":"2023-02-10T14:17:01.000Z","size":1122,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T05:26:33.864Z","etag":null,"topics":["flake8","flake8-plugin"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/flake8-import-as-module/","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":"2023-02-08T20:00:49.000Z","updated_at":"2023-02-10T14:19:06.000Z","dependencies_parsed_at":"2023-02-26T23:47:05.765Z","dependency_job_id":null,"html_url":"https://github.com/joaopalmeiro/flake8-import-as-module","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/joaopalmeiro/flake8-import-as-module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaopalmeiro%2Fflake8-import-as-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaopalmeiro%2Fflake8-import-as-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaopalmeiro%2Fflake8-import-as-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaopalmeiro%2Fflake8-import-as-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joaopalmeiro","download_url":"https://codeload.github.com/joaopalmeiro/flake8-import-as-module/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaopalmeiro%2Fflake8-import-as-module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278788386,"owners_count":26045962,"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-10-07T02:00:06.786Z","response_time":59,"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-12-04T01:10:52.978Z","updated_at":"2025-10-07T14:25:42.926Z","avatar_url":"https://github.com/joaopalmeiro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flake8-import-as-module\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"\" src=\"https://raw.githubusercontent.com/joaopalmeiro/flake8-import-as-module/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-as-module.svg)](https://pypi.org/project/flake8-import-as-module/)\n\nA [Flake8](https://flake8.pycqa.org/) plugin to check if specific packages are imported as modules.\n\n## Installation\n\nVia [Pipenv](https://pipenv.pypa.io/):\n\n```bash\npipenv install --dev flake8 flake8-import-as-module\n```\n\n## Flake8 codes\n\n| Package                                 | Code  | Description                                                                          |\n| --------------------------------------- | ----- | ------------------------------------------------------------------------------------ |\n| [Altair](https://altair-viz.github.io/) | IM001 | `from altair import ...` is unconventional. `altair` should be imported as a module. |\n| [pandas](https://pandas.pydata.org/)    | IM002 | `from pandas import ...` is unconventional. `pandas` should be imported as a module. |\n\n## References\n\n- https://docs.python.org/3.7/tutorial/modules.html\n- https://stackoverflow.com/a/49072655\n- https://github.com/marcgibbons/flake8-datetime-import\n- https://github.com/joaopalmeiro/flake8-import-conventions\n- https://github.com/asottile/flake8-2020\n\n## Development\n\n```bash\npoetry install --with dev\n```\n\n```bash\npoetry shell\n```\n\n```bash\npytest tests/ -v\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaopalmeiro%2Fflake8-import-as-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoaopalmeiro%2Fflake8-import-as-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaopalmeiro%2Fflake8-import-as-module/lists"}