Skip to content

Commit 47ee48f

Browse files
committed
Sort imports
1 parent 3631177 commit 47ee48f

27 files changed

+57
-45
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# License AGPLv3 (https://www.gnu.org/licenses/agpl-3.0-standalone.html)
22
import os
3-
import setuptools
43

4+
import setuptools
55

66
here = os.path.dirname(os.path.abspath(__file__))
77
with open(os.path.join(here, "README.md")) as f:

tests/test_fix_manifest_website.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from tools.fix_manifest_website import main
2-
31
from click.testing import CliRunner
42

3+
from tools.fix_manifest_website import main
4+
55

66
def test_fix_manifest_website(tmp_path):
77
(tmp_path / "a1").mkdir()

tests/test_gen_addon_icon.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import subprocess
77
import sys
88

9-
from tools.gen_addon_icon import ICONS_DIR, ICON_TYPE
9+
from tools.gen_addon_icon import ICON_TYPE, ICONS_DIR
1010

1111

1212
def test_gen_addon_icon(tmp_path):

tests/test_gen_addon_readme.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
import pytest
1111

1212
from tools.gen_addon_readme import (
13+
_get_source_digest,
1314
get_fragment_format,
1415
get_fragments_format,
1516
safe_remove,
16-
_get_source_digest,
1717
)
1818

1919

tests/test_hash.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from tools._hash import hash, _walk
2-
31
import pytest
42

3+
from tools._hash import _walk, hash
4+
55

66
def test_hash(tmp_path):
77
def populate(top):

tests/test_manifest.py

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from tools import manifest
66

7-
87
HERE = os.path.dirname(__file__)
98
TEST_REPO_DIR = os.path.join(HERE, "test_repo")
109

tests/test_towncrier.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import pytest
77
import toml
88
from click.testing import CliRunner
9+
910
from tools.oca_towncrier import _make_issue_format, _prepare_config, oca_towncrier
1011

1112

tests/test_update_pre_commit_excluded_addons.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from __future__ import unicode_literals
2+
23
import subprocess
34
import textwrap
45

tools/add-badges.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import re
1+
import fileinput
22
import os
3+
import pdb
4+
import re
5+
import shutil
36
import subprocess
4-
import fileinput
57
import sys
6-
import shutil
7-
import pdb
88

99
# Runbot urls need the repo id from the table in the runbot server.
1010
# This file is the output of a select id, name from there.

tools/clone_everything.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# License AGPLv3 (https://www.gnu.org/licenses/agpl-3.0-standalone.html)
33

44
import argparse
5+
import os
56
import subprocess
67

78
from .oca_projects import OCA_REPOSITORY_NAMES, url
8-
import os
99

1010

1111
def clone(organization_remotes=None, remove_old_repos=False, target_branch=False):

tools/configure_travis.py

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import click
33
import requests
44

5-
65
OCA_TRAVIS_GITHUB_USER = "oca-travis"
76
OCA_TRAVIS_GITHUB_EMAIL = "[email protected]"
87

tools/copier_update.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import requests
1010

1111
from .gitutils import commit_if_needed
12-
from .oca_projects import BranchNotFoundError, temporary_clone, get_repositories
12+
from .oca_projects import BranchNotFoundError, get_repositories, temporary_clone
1313

1414
IGNORED_REJ_FILES = ["oca_dependencies.txt.rej"]
1515

tools/copy_maintainers.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# -*- coding: utf-8 -*-
22
# License AGPLv3 (https://www.gnu.org/licenses/agpl-3.0-standalone.html)
3-
from __future__ import absolute_import, print_function
4-
53
"""
64
oca-copy-maintainers
75
@@ -10,15 +8,15 @@
108
119
"""
1210

11+
from __future__ import absolute_import, print_function
12+
1313
import argparse
1414
import errno
1515
import os
1616
import sys
1717
from operator import attrgetter
18-
from . import github_login
19-
from . import odoo_login
20-
from . import colors
2118

19+
from . import colors, github_login, odoo_login
2220

2321
COPY_USERS_BLACKLIST = os.environ.get(
2422
"COPY_USERS_BLACKLIST", "~/.config/oca-copy-maintainers/copy_users_blacklist.txt"

tools/create_migration_issue.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,14 @@
8181
"""
8282

8383
from __future__ import print_function
84+
8485
import argparse
85-
from . import github_login
86-
from . import oca_projects
87-
from .config import read_config
8886

8987
import github3
9088

89+
from . import github_login, oca_projects
90+
from .config import read_config
91+
9192
MANIFESTS = ("__openerp__.py", "__manifest__.py")
9293

9394

tools/fix_manifest_website.py

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
from .manifest import get_manifest_path, parse_manifest
99

10-
1110
WEBSITE_KEY_RE = re.compile(r"""(["']website["']\s*:\s*["'])([^"']*)(["'])""")
1211

1312

tools/gen_addon_icon.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
import os
66
import shutil
7+
78
import click
89

910
from .gitutils import commit_if_needed
10-
from .manifest import read_manifest, find_addons, NoManifestFound
11-
11+
from .manifest import NoManifestFound, find_addons, read_manifest
1212

1313
ICONS_DIR = os.path.join("static", "description")
1414

tools/gen_addon_readme.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
from urllib.parse import urljoin
1414

1515
import click
16+
import pypandoc
1617
from docutils.core import publish_file
1718
from jinja2 import Template
18-
import pypandoc
1919

20-
from .gitutils import commit_if_needed
21-
from .manifest import get_manifest_path, read_manifest, find_addons, NoManifestFound
2220
from ._hash import hash
21+
from .gitutils import commit_if_needed
22+
from .manifest import NoManifestFound, find_addons, get_manifest_path, read_manifest
2323

2424
if sys.version_info >= (3, 8):
2525
from typing import Literal

tools/gen_addons_table.py

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"""
1919

2020
from __future__ import print_function
21+
2122
import ast
2223
import io
2324
import logging

tools/gen_metapackage.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
from pathlib import Path
88
from typing import Any, List, Optional
99

10-
10+
from manifestoo_core.addon import Addon, is_addon_dir
11+
from manifestoo_core.metadata import addon_name_to_requirement
1112
from manifestoo_core.odoo_series import (
1213
OdooSeries,
14+
)
15+
from manifestoo_core.odoo_series import (
1316
detect_from_addon_version as detect_odoo_series_from_addon_version,
1417
)
15-
from manifestoo_core.addon import is_addon_dir, Addon
16-
from manifestoo_core.metadata import addon_name_to_requirement
1718

1819
from .compat import tomllib
1920

tools/github_login.py

+2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
import os
77
import subprocess
88
from getpass import getpass
9+
910
import github3
11+
1012
from .config import read_config, write_config
1113

1214

tools/migrate_branch.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,15 @@
8787
"""
8888

8989
from __future__ import print_function
90+
9091
import argparse
9192
import re
92-
from . import github_login
93-
from . import oca_projects
94-
from .config import read_config
93+
9594
from github3.exceptions import NotFoundError
9695

96+
from . import github_login, oca_projects
97+
from .config import read_config
98+
9799
MANIFESTS = ("__openerp__.py", "__manifest__.py")
98100

99101

tools/migrate_branch_empty.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,15 @@
8989
"""
9090

9191
from __future__ import print_function
92+
9293
import argparse
9394
import re
94-
from . import github_login
95-
from . import oca_projects
96-
from .config import read_config
95+
9796
from github3.exceptions import NotFoundError
9897

98+
from . import github_login, oca_projects
99+
from .config import read_config
100+
99101
MANIFESTS = ("__openerp__.py", "__manifest__.py")
100102

101103

tools/oca_projects.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88
"""
99

1010
from __future__ import print_function
11-
from contextlib import contextmanager
11+
1212
import os
1313
import shutil
1414
import subprocess
1515
import tempfile
16+
from contextlib import contextmanager
1617

1718
import appdirs
19+
1820
from .config import NOT_ADDONS, is_main_branch
1921
from .github_login import login
2022

tools/oca_sync_users.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import xmlrpclib
1313

14-
from .odoo_login import login, get_parser
14+
from .odoo_login import get_parser, login
1515

1616

1717
def main():

tools/odoo_login.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
import argparse
66
import os
77
import sys
8-
import erppeek
98
from getpass import getpass
10-
from .config import read_config, write_config
119

10+
import erppeek
11+
12+
from .config import read_config, write_config
1213

1314
ODOO_URL = os.environ.get("ODOO_URL", "https://odoo-community.org")
1415
ODOO_DB = os.environ.get("ODOO_DB", "odoo_community_prod")

tools/publish_modules.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,18 @@
6161
"""
6262

6363
from __future__ import print_function
64+
6465
import logging
6566
from getpass import getpass
67+
6668
import click
67-
from selenium.common.exceptions import NoSuchElementException
6869
from selenium import webdriver
69-
from selenium.webdriver.support.ui import WebDriverWait
70+
from selenium.common.exceptions import NoSuchElementException
7071
from selenium.webdriver.chrome.options import Options
72+
from selenium.webdriver.support.ui import WebDriverWait
7173

72-
from .oca_projects import get_repositories_and_branches, url
7374
from .config import read_config
75+
from .oca_projects import get_repositories_and_branches, url
7476

7577
_logger = logging.getLogger(__name__)
7678

tools/set_repo_labels.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77

88
from __future__ import print_function
9+
910
import click
1011

1112
from .github_login import login

0 commit comments

Comments
 (0)