Skip to content

Commit 0b3ecea

Browse files
committed
lint: apply isort to standardize imports
1 parent ec7eed8 commit 0b3ecea

File tree

16 files changed

+43
-38
lines changed

16 files changed

+43
-38
lines changed

.github/workflows/tox.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
id: test
2323
uses: fedora-python/tox-github-action@main
2424
with:
25-
tox_env: py39,py312,lint
25+
tox_env: py39,py312,lint,isort
2626
dnf_install: >-
2727
--repo fedora --repo updates
2828
krb5-devel

docs/source/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#
1515
import os
1616
import sys
17+
1718
sys.path.insert(0, os.path.abspath('..'))
1819

1920

@@ -182,4 +183,4 @@
182183
epub_exclude_files = ['search.html']
183184

184185

185-
# -- Extension configuration -------------------------------------------------
186+
# -- Extension configuration -------------------------------------------------

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110.15.0 USA
1717
#
1818
# Authors: Ralph Bean <rbean@redhat.com>
19-
from setuptools import setup
2019
import os
2120

21+
from setuptools import setup
22+
2223
with open('requirements.txt', 'rb') as f:
2324
install_requires = f.read().decode('utf-8').split('\n')
2425
if not os.getenv('READTHEDOCS'):

sync-page/event-handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import os
44

55
# 3rd Party Modules
6-
from flask import Flask, render_template, request, redirect
6+
from flask import Flask, redirect, render_template, request
77

88
# Local Modules
9-
from sync2jira.main import load_config, initialize_pr, initialize_issues
9+
from sync2jira.main import initialize_issues, initialize_pr, load_config
1010

1111
# Global Variables
1212
app = Flask(__name__, static_url_path="/assets", static_folder="assets")

sync2jira/downstream_issue.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@
1818
# Authors: Ralph Bean <rbean@redhat.com>
1919

2020
# Python Standard Library Modules
21-
from datetime import datetime, timezone
2221
import difflib
2322
import logging
2423
import operator
2524
import re
25+
from datetime import datetime, timezone
2626
from typing import Optional
2727

2828
# 3rd Party Modules
2929
import arrow
30-
from jira import JIRAError
31-
import jira.client
3230
import jinja2
31+
import jira.client
3332
import pypandoc
33+
from jira import JIRAError
3434

3535
# Local Modules
36-
from sync2jira.intermediary import Issue, PR
36+
from sync2jira.intermediary import PR, Issue
3737
from sync2jira.mailer import send_mail
3838

3939
# The date the service was upgraded

sync2jira/downstream_pr.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import sync2jira.downstream_issue as d_issue
2727
from sync2jira.intermediary import Issue, matcher
2828

29-
3029
log = logging.getLogger('sync2jira')
3130

3231

sync2jira/mailer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
This script is used to send emails
44
"""
55

6-
import smtplib
76
import os
8-
from email.mime.text import MIMEText
7+
import smtplib
98
from email.mime.multipart import MIMEMultipart
9+
from email.mime.text import MIMEText
1010

1111
DEFAULT_FROM = os.environ.get('DEFAULT_FROM')
1212
DEFAULT_SERVER = os.environ.get('DEFAULT_SERVER')

sync2jira/main.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,26 @@
2323
"""
2424
# Build-In Modules
2525
import logging
26-
import warnings
26+
import os
2727
import traceback
28-
from time import sleep
29-
import requests
28+
import warnings
3029
from copy import deepcopy
31-
import os
30+
from time import sleep
3231

3332
# 3rd Party Modules
3433
import fedmsg
3534
import fedmsg.config
3635
import jinja2
37-
from requests_kerberos import HTTPKerberosAuth, OPTIONAL
36+
import requests
37+
from requests_kerberos import OPTIONAL, HTTPKerberosAuth
3838

3939
# Local Modules
40-
import sync2jira.upstream_issue as u_issue
41-
import sync2jira.upstream_pr as u_pr
4240
import sync2jira.downstream_issue as d_issue
4341
import sync2jira.downstream_pr as d_pr
44-
from sync2jira.mailer import send_mail
42+
import sync2jira.upstream_issue as u_issue
43+
import sync2jira.upstream_pr as u_pr
4544
from sync2jira.intermediary import matcher
45+
from sync2jira.mailer import send_mail
4646

4747
# Set up our logging
4848
FORMAT = "[%(asctime)s] %(levelname)s: %(message)s"

sync2jira/upstream_issue.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@
1818
# Authors: Ralph Bean <rbean@redhat.com>
1919

2020
import logging
21-
from urllib.parse import urlencode
2221
from copy import deepcopy
22+
from urllib.parse import urlencode
2323

2424
import requests
2525
from github import Github
2626

2727
import sync2jira.intermediary as i
2828

29-
3029
log = logging.getLogger('sync2jira')
3130
graphqlurl = 'https://api.github.com/graphql'
3231

sync2jira/upstream_pr.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import sync2jira.intermediary as i
2525
import sync2jira.upstream_issue as u_issue
2626

27-
2827
log = logging.getLogger('sync2jira')
2928

3029

0 commit comments

Comments
 (0)