Skip to content

Commit 7a833e7

Browse files
committed
✨ Add modern Python support
Python 3.5 has reached end-of-life, so this commit drops its support and makes the lib more feasible for modern Python versions.
1 parent 00adfcb commit 7a833e7

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: [3.5, 3.6, 3.7, 3.8]
11+
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
1212
steps:
1313
- uses: actions/checkout@v2
1414
- name: Set up Python ${{ matrix.python-version }}

plerr/cli.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,19 @@ def main():
2929
'-v',
3030
'--version',
3131
action='version',
32-
version='plerr v{}'.format(__version__)
32+
version=f'plerr v{__version__}'
3333
)
3434
args = parser.parse_args()
3535

3636
root = pathlib.Path(__file__).resolve().parent
3737
try:
38-
error = next(root.rglob('*{}.md'.format(args.code.upper())))
38+
error = next(root.rglob(f'*{args.code.upper()}.md'))
3939
content = error.read_bytes()
4040
print(highlight(content, MarkdownLexer(), TerminalFormatter()))
4141
sys.exit(0)
4242
except StopIteration:
4343
print(
44-
'Cannot find {} pylint error by such error code.'.format(
45-
args.code
46-
),
44+
f'Cannot find {args.code} pylint error by such error code.',
4745
file=sys.stderr
4846
)
4947
sys.exit(1)

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
packages=setuptools.find_packages(),
2929
install_requires=['Pygments==2.8.1'],
3030
test_suite='plerr.tests.test_package',
31-
python_requires='>=3.5',
31+
python_requires='>=3.6',
3232
include_package_data=True,
3333
keywords=['pylint', 'errors', 'documentation'],
3434
entry_points={'console_scripts': ['plerr=plerr.cli:main']},
@@ -39,10 +39,10 @@
3939
'Operating System :: OS Independent',
4040
'Programming Language :: Python',
4141
'Programming Language :: Python :: 3',
42-
'Programming Language :: Python :: 3.5',
4342
'Programming Language :: Python :: 3.6',
4443
'Programming Language :: Python :: 3.7',
4544
'Programming Language :: Python :: 3.8',
45+
'Programming Language :: Python :: 3.9',
4646
'Programming Language :: Python :: Implementation :: CPython',
4747
'Topic :: Software Development :: Documentation',
4848
'Topic :: Software Development :: Libraries :: Python Modules',

0 commit comments

Comments
 (0)