Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Backport branch-8-0] Increase Python max line length for linting (#6579
)

* Increase Python max line length and fix Flake8 version

* Cover all Python versions

Co-authored-by: sethg <sethg@geographika.co.uk>
  • Loading branch information
github-actions[bot] and geographika committed Aug 3, 2022
1 parent eab78f2 commit 93e353c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mapscript/python/CMakeLists.txt
Expand Up @@ -74,7 +74,7 @@ add_custom_command(
DEPENDS mapscriptvenv.stamp
OUTPUT mapscriptlinting.stamp
WORKING_DIRECTORY ${OUTPUT_FOLDER}
COMMAND ${Python_VENV_SCRIPTS}/flake8 $<TARGET_FILE_DIR:${SWIG_MODULE_pythonmapscript_REAL_NAME}>/mapscript/tests --max-line-length=120
COMMAND ${Python_VENV_SCRIPTS}/flake8 $<TARGET_FILE_DIR:${SWIG_MODULE_pythonmapscript_REAL_NAME}>/mapscript/tests --max-line-length=140
COMMAND ${Python_VENV_SCRIPTS}/flake8 $<TARGET_FILE_DIR:${SWIG_MODULE_pythonmapscript_REAL_NAME}>/mapscript/examples --max-line-length=120
COMMENT "Linting test suite and examples with flake8" # note only one comment is output per custom command block
)
Expand Down
3 changes: 2 additions & 1 deletion mapscript/python/requirements-dev.txt
Expand Up @@ -2,4 +2,5 @@ pytest
pillow
wheel>=0.31.1
setuptools>=40.2.0
flake8
flake8==3.9.2; python_version == '2.7'
flake8==5.0.3; python_version >= '3.0'

0 comments on commit 93e353c

Please sign in to comment.