Skip to content

Commit fd01c2b

Browse files
authored
⬆️ Upgrade Pygments to 2.15.1 (#23)
1 parent a7b6c62 commit fd01c2b

File tree

3 files changed

+24
-23
lines changed

3 files changed

+24
-23
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
set -ex
2121
python -VV
2222
python -m site
23-
python -m pip install coverage Pygments
23+
python -m pip install coverage Pygments==2.15.1
2424
- name: Run package build checks
2525
run: python setup.py test
2626
- name: Run package coverage checks
@@ -33,3 +33,4 @@ jobs:
3333
with:
3434
file: ./coverage.xml
3535
fail_ci_if_error: true
36+
token: ${{ secrets.CODECOV_TOKEN }}
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
## R1710 (inconsistent-return-statements)
2-
2+

33
### :x: Problematic code:
44

55
```python
6-
def foo(x):
7-
if x:
8-
return 1
6+
def foo(x):
7+
if x:
8+
return 1
99
```
10-
10+

1111
### :heavy_check_mark: Correct code:
1212

1313
```python
14-
def foo(x):
15-
if x:
16-
return 1
17-
18-
return None
14+
def foo(x):
15+
if x:
16+
return 1
17+

18+
return None
1919
```
20-
20+

2121
### Rationale:
22-
23-
Either all `return` statements in a function should `return` an expression,
24-
or none of them should. According to **`PEP8`**, if any `return` statement
25-
returns an expression, any `return` statements where no value is returned
26-
should explicitly state this as `return None`, and an explicit `return`
27-
statement should be present at the end of the function (if reachable).
28-
22+

23+
Either all `return` statements in a function should `return` an expression, 
24+
or none of them should. According to **`PEP8`**, if any `return` statement
25+
returns an expression, any `return` statements where no value is returned
26+
should explicitly state this as `return None`, and an explicit `return`
27+
statement should be present at the end of the function (if reachable).
28+

2929
### Related resources:
30-
31-
- [Testcases](https://github.com/PyCQA/pylint/blob/master/tests/functional/i/inconsistent_returns.py)
32-
- [Issue Tracker](https://github.com/PyCQA/pylint/issues?q=is%3Aissue+%22inconsistent-return-statements%22+OR+%22R1710%22)
30+

31+
- [Testcases](https://github.com/PyCQA/pylint/blob/master/tests/functional/i/inconsistent_returns.py)
32+
- [Issue Tracker](https://github.com/PyCQA/pylint/issues?q=is%3Aissue+%22inconsistent-return-statements%22+OR+%22R1710%22)
3333

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
long_description_content_type='text/markdown',
2727
url='https://github.com/vald-phoenix/pylint-errors',
2828
packages=setuptools.find_packages(),
29-
install_requires=['Pygments==2.12.0'],
29+
install_requires=['Pygments==2.15.1'],
3030
test_suite='plerr.tests.test_package',
3131
python_requires='>=3.7',
3232
include_package_data=True,

0 commit comments

Comments
 (0)