Skip to content

Commit

Permalink
✨ Add modern Python support
Browse files Browse the repository at this point in the history
Python 3.5 has reached end-of-life, so this commit drops its support and makes
the lib more feasible for modern Python versions.
  • Loading branch information
sprytnyk committed May 3, 2021
1 parent 00adfcb commit 7a833e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
8 changes: 3 additions & 5 deletions plerr/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,19 @@ def main():
'-v',
'--version',
action='version',
version='plerr v{}'.format(__version__)
version=f'plerr v{__version__}'
)
args = parser.parse_args()

root = pathlib.Path(__file__).resolve().parent
try:
error = next(root.rglob('*{}.md'.format(args.code.upper())))
error = next(root.rglob(f'*{args.code.upper()}.md'))
content = error.read_bytes()
print(highlight(content, MarkdownLexer(), TerminalFormatter()))
sys.exit(0)
except StopIteration:
print(
'Cannot find {} pylint error by such error code.'.format(
args.code
),
f'Cannot find {args.code} pylint error by such error code.',
file=sys.stderr
)
sys.exit(1)
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
packages=setuptools.find_packages(),
install_requires=['Pygments==2.8.1'],
test_suite='plerr.tests.test_package',
python_requires='>=3.5',
python_requires='>=3.6',
include_package_data=True,
keywords=['pylint', 'errors', 'documentation'],
entry_points={'console_scripts': ['plerr=plerr.cli:main']},
Expand All @@ -39,10 +39,10 @@
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Software Development :: Documentation',
'Topic :: Software Development :: Libraries :: Python Modules',
Expand Down

0 comments on commit 7a833e7

Please sign in to comment.