{"id":13734920,"url":"https://github.com/spoqa/flake8-import-order-spoqa","last_synced_at":"2025-07-13T14:31:56.270Z","repository":{"id":57429992,"uuid":"80452747","full_name":"spoqa/flake8-import-order-spoqa","owner":"spoqa","description":"Spoqa's import order style for flake8-import-order","archived":false,"fork":false,"pushed_at":"2018-08-30T21:14:57.000Z","size":44,"stargazers_count":15,"open_issues_count":0,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-06-30T08:48:56.027Z","etag":null,"topics":["coding-conventions","flake8","flake8-import-order","import-order","lint","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/flake8-import-order-spoqa/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spoqa.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2017-01-30T18:59:47.000Z","updated_at":"2019-10-01T23:00:52.000Z","dependencies_parsed_at":"2022-08-26T03:24:11.414Z","dependency_job_id":null,"html_url":"https://github.com/spoqa/flake8-import-order-spoqa","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/spoqa/flake8-import-order-spoqa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2Fflake8-import-order-spoqa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2Fflake8-import-order-spoqa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2Fflake8-import-order-spoqa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2Fflake8-import-order-spoqa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spoqa","download_url":"https://codeload.github.com/spoqa/flake8-import-order-spoqa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2Fflake8-import-order-spoqa/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265155782,"owners_count":23719587,"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","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":["coding-conventions","flake8","flake8-import-order","import-order","lint","python"],"created_at":"2024-08-03T03:01:01.214Z","updated_at":"2025-07-13T14:31:56.024Z","avatar_url":"https://github.com/spoqa.png","language":"Python","funding_links":[],"categories":["Imports"],"sub_categories":[],"readme":"flake8-import-order-spoqa\n=========================\n\n.. image:: https://img.shields.io/pypi/v/flake8-import-order-spoqa.svg\n   :target: https://pypi.org/project/flake8-import-order-spoqa/\n\n.. image:: https://travis-ci.org/spoqa/flake8-import-order-spoqa.svg\n   :target: https://travis-ci.org/spoqa/flake8-import-order-spoqa\n\nThis extends flake8-import-order_ to implement Spoqa's import order convention.\nIt basically follows PEP 8 with our some additional rules:\n\n-  Standard libraries shouldn't be imported using ``from ... import ...``\n   statement.  It's because standard libraries tend to use general terms\n   like ``open``.  We instead use always qualified imports to eliminate\n   name pollution:\n\n   .. code-block:: python\n\n      import sys  # Yes\n\n      from sys import version_info  # No\n\n   However, there are few exceptions like ``typing`` module.  They can be\n   imported in both ways:\n\n   .. code-block:: python\n\n      import typing\n      from typing import Optional  # `from ... import ...` must be latter\n\n-  All other than standard libraries should be imported using\n   ``from ... import ...`` statement:\n\n   .. code-block:: python\n\n      from flask import Flask  # Yes\n\n      import flask  # No\n\n-  Deeper relative imports should go former.  This rule makes consistent\n   even when relative imports are rewritten as absolute imports.\n\n   .. code-block:: python\n\n      from ..deeper import former\n      from ...deepest import later\n\n-  Imported names are splited to three categories:  ``CONSTANT_NAME``,\n   ``ClassName``, and ``normal_names``, and follow that order:\n\n   .. code-block:: python\n\n      from something import CONST_A, CONST_B, ClassA, ClassB, any_func, any_var\n\n.. _flake8-import-order: https://github.com/PyCQA/flake8-import-order\n\n\nUsage\n-----\n\nInstall the ``flake8-import-order-spoqa`` using pip_, and then specify\n``--import-order-style=spoqa`` option.  Or you can specify it on the config_\nfile as well:\n\n.. code-block:: ini\n\n   [flake8]\n   import-order-style = spoqa\n\nBecause `runtime extensible styles`__ is introduced__ from\nflake-import-order 0.12, you need to install flake-import-order 0.12 or later.\n\n.. _pip: http://pip-installer.org/\n.. _config: http://flake8.pycqa.org/en/latest/user/configuration.html\n__ https://github.com/PyCQA/flake8-import-order#extending-styles\n__ https://github.com/PyCQA/flake8-import-order/pull/103\n\n\nDistribution\n------------\n\nWritten by `Hong Minhee`__, and distributed under GPLv3_ or later.\n\n__ https://hongminhee.org/\n.. _GPLv3: https://www.gnu.org/licenses/gpl-3.0.html\n\n\nChangelog\n---------\n\nVersion 1.5.1\n~~~~~~~~~~~~~\n\nTo be released.\n\n\nVersion 1.5.0\n~~~~~~~~~~~~~\n\nReleased on August 31, 2018.\n\n- The ``dataclasses`` module, like ``typing``, now can be imported without\n  a qualifier (e.g., ``from dataclasses import ...``).\n\n\nVersion 1.4.1\n~~~~~~~~~~~~~\n\nReleased on August 6, 2018.\n\n- Python 3.7 can be supported by updating flake8-import-order to 0.18.\n  See its changelog__ to know more about\n  updates.\n\n__ https://github.com/PyCQA/flake8-import-order/blob/master/CHANGELOG.rst#018-2018-07-08\n\n\nVersion 1.4.0\n~~~~~~~~~~~~~\n\nReleased on May 22, 2018.\n\n- Python 3.3 became no more supported.\n\n\nVersion 1.3.0\n~~~~~~~~~~~~~\n\nReleased on February 12, 2018.\n\n- Older versions than flake8-import-order 0.17 are now unsupported.\n  (Under the hood, since flake8-import-order 0.17 refactored their internals\n  so that constants like ``IMPORT_3RD_PARTY``, ``IMPORT_APP``,\n  ``IMPORT_APP_PACKAGE``, ``IMPORT_APP_RELATIVE``, and ``IMPORT_STDLIB``\n  are evolved to ``ImportType`` enum type, flake8-import-order-spoqa also\n  became to follow that.)  [`#3`_]\n\n.. _#3: https://github.com/spoqa/flake8-import-order-spoqa/issues/3\n\n\nVersion 1.2.0\n~~~~~~~~~~~~~\n\nReleased on November 27, 2017.\n\n- Older versions than flake8-import-order 0.16 are now unsupported.\n  (Under the hood, since flake8-import-order 0.16 refactored their internals\n  so that no more ``Style.check()`` method and ``Style.imports`` property\n  exist, flake8-import-order-spoqa also became to follow that.)\n\n\nVersion 1.1.0\n~~~~~~~~~~~~~\n\nReleased on October 31, 2017.\n\n- Older versions than flake8-import-order 0.14.2 are now unsupported.\n\n\nVersion 1.0.2\n~~~~~~~~~~~~~\n\nReleased on October 31, 2017.\n\n- Fixed incompatibility with flake8-import-order 0.14.1 or higher.\n\n\nVersion 1.0.1\n~~~~~~~~~~~~~\n\nReleased on July 15, 2017.\n\n- Fixed a bug that wrong order of names (e.g. ``from ... import second, first``)\n  had been not warned.\n\n\nVersion 1.0.0\n~~~~~~~~~~~~~\n\nInitial release.  Released on February 12, 2017.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspoqa%2Fflake8-import-order-spoqa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspoqa%2Fflake8-import-order-spoqa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspoqa%2Fflake8-import-order-spoqa/lists"}