Spaces:
Running
Running
Merge pull request #17 from mapaction/develop
Browse files- .pre-commit-config.yaml +9 -12
- app/pages/1_π_Flood_extent_analysis.py +2 -2
- setup.cfg +14 -6
.pre-commit-config.yaml
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
default_language_version:
|
2 |
-
python: python3.
|
3 |
|
4 |
repos:
|
5 |
- repo: https://github.com/pre-commit/pre-commit-hooks
|
6 |
-
rev: v4.0
|
7 |
hooks:
|
8 |
- id: trailing-whitespace
|
9 |
- id: end-of-file-fixer
|
@@ -11,26 +11,23 @@ repos:
|
|
11 |
- id: check-toml
|
12 |
- id: check-yaml
|
13 |
- repo: https://github.com/psf/black
|
14 |
-
rev:
|
15 |
hooks:
|
16 |
- id: black
|
17 |
- repo: https://github.com/PyCQA/isort
|
18 |
-
rev: 5.
|
19 |
hooks:
|
20 |
- id: isort
|
21 |
- repo: https://github.com/pycqa/flake8
|
22 |
-
rev:
|
23 |
hooks:
|
24 |
- id: flake8
|
25 |
additional_dependencies:
|
26 |
-
|
27 |
-
|
28 |
-
- flake8-deprecated==1.3
|
29 |
- flake8-docstrings==1.6.0
|
30 |
-
- flake8-
|
31 |
-
- flake8-keyword-arguments==0.1.0
|
32 |
-
- flake8-print==4.0.0
|
33 |
-
- flake8-sfs==0.0.3
|
34 |
- repo: https://github.com/pre-commit/mirrors-mypy
|
35 |
rev: v0.910
|
36 |
hooks:
|
|
|
1 |
default_language_version:
|
2 |
+
python: python3.9
|
3 |
|
4 |
repos:
|
5 |
- repo: https://github.com/pre-commit/pre-commit-hooks
|
6 |
+
rev: v4.4.0
|
7 |
hooks:
|
8 |
- id: trailing-whitespace
|
9 |
- id: end-of-file-fixer
|
|
|
11 |
- id: check-toml
|
12 |
- id: check-yaml
|
13 |
- repo: https://github.com/psf/black
|
14 |
+
rev: 23.1.0
|
15 |
hooks:
|
16 |
- id: black
|
17 |
- repo: https://github.com/PyCQA/isort
|
18 |
+
rev: 5.12.0
|
19 |
hooks:
|
20 |
- id: isort
|
21 |
- repo: https://github.com/pycqa/flake8
|
22 |
+
rev: 6.0.0
|
23 |
hooks:
|
24 |
- id: flake8
|
25 |
additional_dependencies:
|
26 |
+
# - flake8-bugbear==21.9.2
|
27 |
+
# - flake8-comprehensions==3.6.1
|
28 |
+
# - flake8-deprecated==1.3
|
29 |
- flake8-docstrings==1.6.0
|
30 |
+
# - flake8-keyword-arguments==0.1.0
|
|
|
|
|
|
|
31 |
- repo: https://github.com/pre-commit/mirrors-mypy
|
32 |
rev: v0.910
|
33 |
hooks:
|
app/pages/1_π_Flood_extent_analysis.py
CHANGED
@@ -192,8 +192,8 @@ if submitted:
|
|
192 |
try:
|
193 |
# Add flood vector layer to map
|
194 |
Map2.add_layer(
|
195 |
-
ee_object=
|
196 |
-
name="Flood extent
|
197 |
)
|
198 |
# Center map on flood raster
|
199 |
Map2.centerObject(detected_flood_raster)
|
|
|
192 |
try:
|
193 |
# Add flood vector layer to map
|
194 |
Map2.add_layer(
|
195 |
+
ee_object=detected_flood_raster,
|
196 |
+
name="Flood extent raster",
|
197 |
)
|
198 |
# Center map on flood raster
|
199 |
Map2.centerObject(detected_flood_raster)
|
setup.cfg
CHANGED
@@ -1,7 +1,15 @@
|
|
1 |
[flake8]
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
[flake8]
|
2 |
+
max-pos-args = 3
|
3 |
+
ignore =
|
4 |
+
# Allow f-strings
|
5 |
+
SFS301,
|
6 |
+
# Allow print statements
|
7 |
+
T001,
|
8 |
+
# Allow implictly concatenated string literals in one line
|
9 |
+
ISC001,
|
10 |
+
# Allow percent operator in string
|
11 |
+
SFS101,
|
12 |
+
# Allow more than one # for comments
|
13 |
+
E266,
|
14 |
+
# Allow line break before binary operator
|
15 |
+
W503
|