Skip to content

Commit

Permalink
RadonBear: Pin to version 1.4.0
Browse files Browse the repository at this point in the history
radon 1.4.2 added a dependency on flake8-polyfill, which depends
on flake8 without any version specification, and flake8 versions
have various version dependencies on pyflakes and pycodestyle.
As a result, it is not possible to know what versions of pyflakes
and pycodestyle that will be required to be compatible with
whatever flake8 version happens to be installed.

Fixes coala#1228
  • Loading branch information
jayvdb committed Jan 2, 2017
1 parent dd0a8c1 commit fc91eee
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
10 changes: 8 additions & 2 deletions .ci/generate_bear_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@

PROJECT_BEAR_DIR = os.path.abspath(os.path.join(PROJECT_DIR, 'bears'))

PINNED_PACKAGES = (
'radon',
)


def get_args():
parser = argparse.ArgumentParser(
Expand Down Expand Up @@ -71,8 +75,10 @@ def get_all_pip_requirements(bears):
def write_requirements(requirements, output):
for requirement in requirements:
if requirement.version:
output.write(requirement.package + '~=' + requirement.version +
'\n')
marker = '==' if requirement.package in PINNED_PACKAGES else '~='
output.write('{0}{1}{2}\n'.format(requirement.package,
marker,
requirement.version))
else:
output.write(requirement.package + '\n')

Expand Down
4 changes: 2 additions & 2 deletions bear-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ nltk~=3.2
proselint~=0.7.0
pycodestyle~=2.2
pydocstyle~=1.1
pyflakes~=1.3.0
pyflakes~=1.4.0
pylint~=1.6
pyyaml~=3.12
radon~=1.4
radon==1.4.0
requests~=2.12
restructuredtext-lint~=0.17.2
rstcheck~=2.2
Expand Down
2 changes: 1 addition & 1 deletion bears/python/PyFlakesBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PyFlakesBear:
See https://github.com/PyCQA/pyflakes for more info.
"""
LANGUAGES = {'Python', 'Python 3'}
REQUIREMENTS = {PipRequirement('pyflakes', '1.3.0')}
REQUIREMENTS = {PipRequirement('pyflakes', '1.4.0')}
AUTHORS = {'The coala developers'}
AUTHORS_EMAILS = {'[email protected]'}
LICENSE = 'AGPL-3.0'
Expand Down
2 changes: 1 addition & 1 deletion bears/python/RadonBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class RadonBear(LocalBear):
LANGUAGES = {'Python', 'Python 2', 'Python 3'}
REQUIREMENTS = {PipRequirement('radon', '1.4')}
REQUIREMENTS = {PipRequirement('radon', '1.4.0')}
AUTHORS = {'The coala developers'}
AUTHORS_EMAILS = {'[email protected]'}
LICENSE = 'AGPL-3.0'
Expand Down

0 comments on commit fc91eee

Please sign in to comment.