Skip to content

Commit

Permalink
Merge pull request #80 from jnns/show-version
Browse files Browse the repository at this point in the history
Fix version display in `flake8 --help`
  • Loading branch information
gforcada committed Mar 13, 2020
2 parents 8af7b8f + 8cd892b commit ef75d34
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
5 changes: 4 additions & 1 deletion flake8_isort.py
Expand Up @@ -13,9 +13,12 @@
from ConfigParser import SafeConfigParser


__version__ = '2.8.1.dev0'


class Flake8Isort(object):
name = 'flake8_isort'
version = '2.3'
version = __version__
isort_unsorted = (
'I001 isort found an import in the wrong position'
)
Expand Down
12 changes: 11 additions & 1 deletion setup.py
@@ -1,6 +1,16 @@
# -*- coding: utf-8 -*-
from setuptools import setup

import re


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


short_description = 'flake8 plugin that integrates isort .'

Expand All @@ -12,7 +22,7 @@

setup(
name='flake8-isort',
version='2.8.1.dev0',
version=get_version(),
description=short_description,
long_description=long_description,
# Get more from http://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down

0 comments on commit ef75d34

Please sign in to comment.