Skip to content

Commit c795437

Browse files
committed
chore: overhaul project files
Follow flake8-builtins lead.
1 parent ef9ae20 commit c795437

File tree

7 files changed

+40
-55
lines changed

7 files changed

+40
-55
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
*.egg-info
22
*.pyc
33

4+
.cache
45
.coverage
56
.installed.cfg
7+
.hypothesis
68
bin
79
develop-eggs
810
include

LICENSE.rst

-17
This file was deleted.

MANIFEST.in

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
include MANIFEST.in LICENSE *.rst *.py *.cfg *.ini
2-
exclude .installed.cfg .coveragerc *.pyc
1+
include MANIFEST.in
2+
include LICENSE
3+
include setup.cfg
4+
include *.rst
5+
include *.py
6+
include *requirements.txt
37

8+
exclude .installed.cfg
9+
exclude .coveragerc
10+
exclude *.pyc
11+
exclude *.in

README.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.. -*- coding: utf-8 -*-
22
3-
.. image:: https://github.com/gforcada/flake8-isort/actions/workflows/tests.yml/badge.svg?branch=master
4-
:target: https://github.com/gforcada/flake8-isort/actions/workflows/tests.yml
3+
.. image:: https://github.com/gforcada/flake8-isort/actions/workflows/testing.yml/badge.svg?branch=master
4+
:target: https://github.com/gforcada/flake8-isort/actions/workflows/testing.yml
55

6-
.. image:: https://coveralls.io/repos/gforcada/flake8-isort/badge.svg?branch=master&service=github
6+
.. image:: https://coveralls.io/repos/gforcada/flake8-isort/badge.svg?branch=master
77
:target: https://coveralls.io/github/gforcada/flake8-isort?branch=master
88

99
Flake8 meet isort
@@ -47,7 +47,7 @@ Error codes
4747

4848
Requirements
4949
------------
50-
- Python 2.7, 3.5, 3.6, pypy or pypy3
50+
- Python 3.7, 3.8, 3.9, 3.10 and pypy3
5151
- flake8
5252
- isort
5353

flake8_isort.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@
1010
import warnings
1111

1212

13-
__version__ = '4.2.1.dev0'
14-
15-
1613
class Flake8IsortBase(object):
1714
name = 'flake8_isort'
18-
version = __version__
15+
version = '4.2.1'
1916
isort_unsorted = (
2017
'I001 isort found an import in the wrong position'
2118
)

setup.cfg

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
[bdist_wheel]
2-
universal = 0
3-
41
[zest.releaser]
52
create-wheel = yes
6-
python-file-with-version = flake8_isort.py
3+
4+
[check-manifest]
5+
ignore =
6+
.installed.cfg
77

88
[isort]
9-
force_alphabetical_sort = True
10-
force_single_line = True
11-
lines_after_imports = 2
12-
line_length = 200
9+
profile = black

setup.py

+18-20
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
1-
# -*- coding: utf-8 -*-
21
from setuptools import setup
32

4-
import re
5-
3+
short_description = 'flake8 plugin that integrates isort .'
64

7-
def get_version(file="flake8_isort.py"):
8-
with open(file) as f:
9-
for line in f:
10-
m = re.match(r"^__version__ = '(?P<version>.*?)'$", line)
11-
if m:
12-
return m.group('version')
135

6+
def read_file(filename):
7+
with open(filename) as file_obj:
8+
file_contents = file_obj.read()
9+
return file_contents
1410

15-
short_description = 'flake8 plugin that integrates isort .'
1611

17-
long_description = '{0}\n{1}'.format(
18-
open('README.rst').read(),
19-
open('CHANGES.rst').read(),
20-
)
12+
long_description = f"""
13+
{read_file('README.rst')}
14+
{read_file('CHANGES.rst')}
15+
"""
2116

2217

2318
setup(
2419
name='flake8-isort',
25-
version=get_version(),
20+
version='4.2.1.dev0',
2621
description=short_description,
2722
long_description=long_description,
28-
# Get more from http://pypi.python.org/pypi?%3Aaction=list_classifiers
23+
# Get more from https://pypi.org/classifiers/
2924
classifiers=[
3025
'Development Status :: 5 - Production/Stable',
3126
'Environment :: Console',
@@ -36,7 +31,6 @@ def get_version(file="flake8_isort.py"):
3631
'Programming Language :: Python',
3732
'Programming Language :: Python :: 3',
3833
'Programming Language :: Python :: 3 :: Only',
39-
'Programming Language :: Python :: 3.6',
4034
'Programming Language :: Python :: 3.7',
4135
'Programming Language :: Python :: 3.8',
4236
'Programming Language :: Python :: 3.9',
@@ -46,20 +40,24 @@ def get_version(file="flake8_isort.py"):
4640
'Topic :: Software Development',
4741
'Topic :: Software Development :: Quality Assurance',
4842
],
49-
keywords='pep8 flake8 isort imports',
43+
python_requires='>=3.7',
44+
keywords='pep8 flake8 python isort imports',
5045
author='Gil Forcada',
5146
author_email='[email protected]',
5247
url='https://github.com/gforcada/flake8-isort',
5348
license='GPL version 2',
5449
py_modules=['flake8_isort', ],
5550
include_package_data=True,
51+
test_suite='run_tests',
5652
zip_safe=False,
5753
install_requires=[
58-
'flake8 >= 3.2.1, <6',
54+
'flake8',
5955
'isort >= 4.3.5, <6',
6056
],
6157
extras_require={
62-
'test': ['pytest-cov'],
58+
'test': [
59+
'pytest',
60+
],
6361
},
6462
entry_points={
6563
'flake8.extension': ['I00 = flake8_isort:Flake8Isort', ],

0 commit comments

Comments
 (0)