{"repo":"asottile/reorder-python-imports","free":true,"listed":false,"github":"https://github.com/asottile/reorder-python-imports","clone":"git clone https://github.com/asottile/reorder-python-imports.git","description":"Rewrites source to reorder python imports","language":"Python","stars":784,"topics":["python","linter","pre-commit","refactoring"],"license":"MIT","category":"dev-tools","readme_excerpt":"reorder-python-imports ====================== Tool for automatically reordering python imports. Similar to isort but uses static analysis more. Installation Console scripts Consult reorder-python-imports --help for the full set of options. reorder-python-imports takes filenames as positional arguments Common options: - --py##-plus : see below. - --add-import / --remove-import : see below. - --replace-import : see below. - --application-directories : by default, reorder-python-imports assumes your project is rooted at . . If this isn't true, tell it where your import roots live. For example, when using the popular ./src layout you'd use --application-directories=.:src (note: multiple paths are separated using a : ). - --unclassifiable-application-module : (may be specified multiple times) modules names that are considered application modules. this setting is intended to be used for things like C modules which may not always appear on the filesystem. As a pre-commit hook See pre-commit for instructions Sample .pre-commit-config.yaml What does it do? Separates imports into three sections becomes (stdlib, third party, first party) import imports before from imports becomes Splits from imports becomes Removes duplicate imports becomes Using # noreorder Lines containing and after lines which contain a # noreorder comment will be ignored. Additionally any imports that appear after non-whitespace non-comment lines will be ignored. For instance, these will not be changed: why this sty","default_branch":null,"files":null,"tree":[],"storefront":"/r/asottile","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/asottile/reorder-python-imports/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}