cabhishek commented on a change in pull request #3423:
URL: https://github.com/apache/iceberg/pull/3423#discussion_r740583214
##########
File path: python/setup.cfg
##########
@@ -33,6 +33,7 @@ license_files =
classifiers =
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
+ Programming Language :: Python :: 3.6
Review comment:
Reverted changes and dropped 3.6 support.
##########
File path: python/tox.ini
##########
@@ -34,79 +33,39 @@ commands =
coverage report -m --fail-under=90
coverage html -d test-reports/{envname}/coverage-html
coverage xml -o test-reports/{envname}/coverage.xml
-[testenv:format]
-description = reformat all source code
-basepython = python3
-deps =
- black
- isort
- flake8
-skip_install = true
-commands =
- isort --project iceberg --profile black setup.py src tests
- black setup.py src tests
- flake8 setup.py src tests
[testenv:linters]
-basepython = python3
-skip_install = true
-deps =
- .
- {[testenv:isort]deps}
- {[testenv:black]deps}
- {[testenv:flake8]deps}
- {[testenv:bandit]deps}
- {[testenv:mypy]deps}
-commands =
- {[testenv:isort]deps}
- {[testenv:black]deps}
- {[testenv:flake8]commands}
- {[testenv:bandit]commands}
- {[testenv:mypy]commands}
-
-[testenv:isort]
-basepython = python3
-skip_install = true
+usedevelop = true
deps =
- isort
+ {[testenv:format-check]deps}
+ {[testenv:type-check]deps}
commands =
- isort --recursive --project iceberg --profile black --check-only setup.py
src tests
+ {[testenv:format-check]commands}
+ {[testenv:type-check]commands}
-[testenv:black]
-basepython = python3
-skip_install = true
+[testenv:format-check]
deps =
black
+ isort
+ autoflake
commands =
- black --check --diff src setup.py tests
+ autoflake -r --check --ignore-init-module-imports
--remove-all-unused-imports setup.py src tests
+ isort --profile black --check-only setup.py src tests
+ black --check setup.py src tests
-[testenv:flake8]
-basepython = python3
-skip_install = true
+[testenv:format]
deps =
- flake8>=3.8.4
- flake8-import-order>=0.9
- flake8-bugbear
+ {[testenv:format-check]deps}
commands =
- flake8 src setup.py tests
+ autoflake -r --in-place --ignore-init-module-imports
--remove-all-unused-imports setup.py src tests
+ isort --profile black setup.py src tests
+ black setup.py src tests
-[testenv:mypy]
-basepython = python3
-skip_install = true
+[testenv:type-check]
deps =
mypy
- types-pytz
- types-python-dateutil
-commands =
- mypy --ignore-missing-imports src/
-
-[testenv:bandit]
-basepython = python3
-skip_install = true
-deps =
- bandit
commands =
- bandit --ini tox.ini -r src
+ mypy src
Review comment:
Added the flag. And given how common it is to have code like `x: int =
None` I guess the [future](https://github.com/python/mypy/issues/9091) version
of mypy will make that flag the default.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]