Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_version(self):
"""Make sure the version number is correct."""
out = subprocess.check_output("proselint --version", shell=True)
assert out.decode('utf-8') == __version__ + "\n"
def test_version(self):
"""Make sure the version number is correct."""
out = subprocess.check_output(["proselint", "--version"])
assert out.decode('utf-8') == __version__ + "\n"
@click.version_option(__version__, '--version', '-v', message='%(version)s')
@click.option('--debug', '-d', is_flag=True, help="Give verbose output.")
@click.option('--clean', '-c', is_flag=True, help="Clear the cache.")
@click.option('--json', '-j', 'output_json', is_flag=True,
help="Output as JSON.")
@click.option('--time', '-t', is_flag=True, help="Time on a corpus.")
@click.option('--demo', is_flag=True, help="Run over demo file.")
@click.option('--compact', is_flag=True, help="Shorten output.")
@click.argument('paths', nargs=-1, type=click.Path())
@close_cache_shelves_after
def proselint(paths=None, version=None, clean=None, debug=None,
output_json=None, time=None, demo=None, compact=None):
"""A CLI for proselint, a linter for prose."""
if time:
click.echo(timing_test())
return
here = os.path.abspath(os.path.dirname(__file__))
try:
with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = '\n' + f.read()
except FileNotFoundError:
long_description = DESCRIPTION
setup(
name='proselint',
version=__version__,
description=DESCRIPTION,
long_description=long_description,
long_description_content_type='text/markdown',
url=base_url,
download_url="{}/tarball/{}".format(base_url, __version__),
author='Amperser Labs',
author_email='hello@amperser.com',
license='BSD',
classifiers=[
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
],
packages=find_packages(
exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
package_data={'': ['demo.md', '.proselintrc']},
zip_safe=False,
entry_points={
DESCRIPTION = "A linter for prose."
base_url = 'http://github.com/amperser/proselint'
here = os.path.abspath(os.path.dirname(__file__))
try:
with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = '\n' + f.read()
except FileNotFoundError:
long_description = DESCRIPTION
setup(
name='proselint',
version=__version__,
description=DESCRIPTION,
long_description=long_description,
long_description_content_type='text/markdown',
url=base_url,
download_url="{}/tarball/{}".format(base_url, __version__),
author='Amperser Labs',
author_email='hello@amperser.com',
license='BSD',
classifiers=[
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
],