Skip to content

Commit

Permalink
Update the flake8 configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry authored and nyalldawson committed May 9, 2021
1 parent 4ee22a7 commit 3711fcf
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 7 deletions.
123 changes: 117 additions & 6 deletions .flake8
@@ -1,11 +1,122 @@
[flake8]
ignore =
E501, E402, N802, N806, F401, N803, F841, N801, N805, N815, N816, F811, N814, N804, W503, N807, N813, W504, E741,
# E722: Do not use bare excepts -- A candidate to remove from this list!
E722
# module imported but unused
F401,
# module level import not at top of file
E402,
# line too long (82 characters)
E501,
# do not use variables named ‘l’, ‘O’, or ‘I’
E741,
# redefinition of unused name from line N
F811,
# local variable name is assigned to but never used
F841,
# class names should use CapWords convention
N801,
# function name should be lowercase
N802,
# argument name should be lowercase
N803,
# first argument of a classmethod should be named 'cls'
N804,
# first argument of a method should be named 'self'
N805,
# variable in function should be lowercase
N806,
# function name should not start and end with '__'
N807,
# camelcase imported as lowercase
N813,
# camelcase imported as constant (distinct from N817 for selective enforcement)
N814,
# mixedCase variable in class scope
N815,
# mixedCase variable in global scope
N816,
W503,
W504,

per-file-ignores =
# E722: Do not use bare excepts -- A candidate to remove from this list!
cmake/FindPyQt5.py:E722,
python/console/console_editor.py:E722,
python/console/console_sci.py:E722,
python/plugins/db_manager/db_model.py:E722,
python/plugins/db_manager/db_plugins/spatialite/connector.py:E722,
python/plugins/db_manager/dlg_query_builder.py:E722,
python/plugins/db_manager/dlg_sql_layer_window.py:E722,
python/plugins/db_manager/dlg_sql_window.py:E722,
python/plugins/db_manager/table_viewer.py:E722,
python/plugins/processing/algs/gdal/GdalUtils.py:E722,
python/plugins/processing/algs/grass7/Grass7Utils.py:E722,
python/plugins/processing/algs/otb/OtbChoiceWidget.py:E722,
python/plugins/processing/algs/otb/OtbUtils.py:E722,
python/plugins/processing/algs/qgis/FieldPyculator.py:E722,
python/plugins/processing/algs/qgis/FindProjection.py:E722,
python/plugins/processing/algs/qgis/TextToFloat.py:E722,
python/plugins/processing/algs/qgis/ui/HeatmapWidgets.py:E722,
python/plugins/processing/algs/qgis/ui/InterpolationWidgets.py:E722,
python/plugins/processing/algs/saga/SagaUtils.py:E722,
python/plugins/processing/core/outputs.py:E722,
python/plugins/processing/core/parameters.py:E722,
python/plugins/processing/core/ProcessingConfig.py:E722,
python/plugins/processing/core/ProcessingLog.py:E722,
python/plugins/processing/core/Processing.py:E722,
python/plugins/processing/gui/AlgorithmDialog.py:E722,
python/plugins/processing/gui/AlgorithmLocatorFilter.py:E722,
python/plugins/processing/gui/ConfigDialog.py:E722,
python/plugins/processing/gui/ExtentSelectionPanel.py:E722,
python/plugins/processing/gui/Help2Html.py:E722,
python/plugins/processing/gui/menus.py:E722,
python/plugins/processing/gui/NumberInputPanel.py:E722,
python/plugins/processing/gui/PointSelectionPanel.py:E722,
python/plugins/processing/gui/ProcessingToolbox.py:E722,
python/plugins/processing/gui/RangePanel.py:E722,
python/plugins/processing/gui/wrappers.py:E722,
python/plugins/processing/preconfigured/PreconfiguredAlgorithmDialog.py:E722,
python/plugins/processing/script/ScriptEditorDialog.py:E722,
python/plugins/processing/script/ScriptUtils.py:E722,
python/plugins/processing/tools/dataobjects.py:E722,
python/plugins/processing/tools/general.py:E722,
python/plugins/processing/tools/vector.py:E722,
python/pyplugin_installer/installer_data.py:E722,
python/pyplugin_installer/installer.py:E722,
python/pyplugin_installer/qgsplugindependenciesdialog.py:E722,
python/pyplugin_installer/qgsplugininstallerinstallingdialog.py:E722,
python/user.py:E722,
python/utils.py:E722,
scripts/process_function_template.py:E722,
scripts/random_vector.py:E722,
tests/code_layout/doxygen_parser.py:E722,
tests/code_layout/test_qgssipcoverage.py:E722,
tests/src/python/mockedwebserver.py:E722,
tests/src/python/providertestbase.py:E722,
tests/src/python/qgis_wrapped_server.py:E722,
tests/src/python/test_authmanager_oauth2_ows.py:E722,
tests/src/python/test_authmanager_password_ows.py:E722,
tests/src/python/test_authmanager_pki_ows.py:E722,
tests/src/python/test_db_manager_gpkg.py:E722,
tests/src/python/test_db_manager_postgis.py:E722,
tests/src/python/test_db_manager_spatialite.py:E722,
tests/src/python/test_offline_editing_wfs.py:E722,
tests/src/python/test_qgsdelimitedtextprovider.py:E722,
tests/src/python/test_qgsexpressionlineedit.py:E722,
tests/src/python/test_qgsfilterlineedit.py:E722,
tests/src/python/test_qgsgeometry.py:E722,
tests/src/python/test_qgsnewgeopackagelayerdialog.py:E722,
tests/src/python/test_qgsprojectbadlayers.py:E722,
tests/src/python/test_qgsproviderconnection_mssql.py:E722,
tests/src/python/test_qgsqueryresultmodel.py:E722,
tests/src/python/test_qgsserver_api.py:E722,
tests/src/python/test_qgsserver_landingpage.py:E722,
tests/src/python/test_qgsserver_security.py:E722,
tests/src/python/test_qgsserver_wms.py:E722,
tests/src/python/test_qgssettings.py:E722,
tests/src/python/test_qgssymbollayer.py:E722,
tests/src/python/test_qgstreewidgetitem.py:E722,

exclude =
exclude =
# There is simply too much in here, somebody will need to check these manually
src/plugins/grass/scripts,
# Generated code, hacking allowed. Feel free to go over it
Expand All @@ -14,5 +125,5 @@ exclude =
python/analysis/auto_additions/,
python/gui/auto_additions/,
python/server/auto_additions/,
# Plenty of star imports used
python/PyQt/
# Plenty of star imports used
python/PyQt/
2 changes: 1 addition & 1 deletion python/testing/__init__.py
Expand Up @@ -487,7 +487,7 @@ def start_app(cleanup=True):

try:
sys.argv
except:
except AttributeError:
sys.argv = ['']

# In python3 we need to convert to a bytes object (or should
Expand Down

0 comments on commit 3711fcf

Please sign in to comment.