Skip to content

Commit aa98abc

Browse files
committed
Fixed Python 3.10 / Python 4 possible error
1 parent ffe9208 commit aa98abc

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

__pkginfo__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"py_modules",
2323
"entry_points",
2424
"__license__",
25+
"__author__",
2526
"short_desc",
2627
"author",
2728
"author_email",

domdf_python_tools/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import sys
3131
from typing import Any, Generator, Iterable, List, Sequence, Tuple, Union
3232

33-
pyversion = int(sys.version[0]) # Python Version
33+
pyversion: int = int(sys.version_info.major) # Python Version
3434

3535

3636
def as_text(value: Any) -> str:

lint_roller.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ declare errors="E301,E303,E304,E305,E306,E502,W291,W293,W391,E226,E225,E241,E231
77
declare belligerent="W292,E265,"
88

99
# Only warn for these
10-
declare warnings="E101,E111,E112,E113,E121,E122,E124,E125,E127,E128,E129,E131,E133,E201,E202,E203,E211,E222,E223,E224,E225,E227,E228,E242,E251,E261,E262,E271,E272,E402,E703,E711,E712,E713,E714,E721,W504,E302,"
10+
declare warnings="E101,E111,E112,E113,E121,E122,E125,E127,E128,E129,E131,E133,E201,E202,E203,E211,E222,E223,E224,E225,E227,E228,E242,E251,E261,E262,E271,E272,E402,E703,E711,E712,E713,E714,E721,W504,E302,YTT101,YTT102,YTT103,YTT201,YTT202,YTT203,YTT204,YTT301,YTT302,YTT303,"
1111

1212

1313
if [ -z "$(git status --porcelain --untracked-files=no)" ] || [ "$1" == "-f" ]; then

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ skip_install = true
7676
deps =
7777
autopep8 >=1.5.2
7878
flake8 >=3.8.2
79+
flake8-2020 >= 1.6.0
7980
commands = flake8 domdf_python_tools tests
8081

8182

@@ -126,7 +127,7 @@ commands = tox -e pyup,isort,yapf,mypy,lint
126127

127128
[flake8]
128129
max-line-length = 120
129-
select = E301 E303 E304 E305 E306 E502 W291 W293 W391 E226 E225 E241 E231 E101 E111 E112 E113 E121 E122 E124 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E227 E228 E242 E251 E261 E262 E271 E272 E402 E703 E711 E712 E713 E714 E721 W504 E302 W292 E265
130+
select = E301 E303 E304 E305 E306 E502 W291 W293 W391 E226 E225 E241 E231 E101 E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E227 E228 E242 E251 E261 E262 E271 E272 E402 E703 E711 E712 E713 E714 E721 W504 E302 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 W292 E265
130131
exclude = .git,__pycache__,doc-source,old,build,dist,make_conda_recipe.py,__pkginfo__.py,setup.py
131132

132133

0 commit comments

Comments
 (0)