Skip to content

Commit f27d117

Browse files
committed
#176 introduce .flake8 config file and fix flake8 errs
1 parent 6b53cd5 commit f27d117

6 files changed

Lines changed: 10 additions & 5 deletions

File tree

.flake8

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[flake8]
2+
ignore =
3+
max-line-length = 79
4+
exclude = .git,.cache,docs,docker,build,dist,GeoHealthCheck/migrations
5+
max-complexity = 38

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ install:
1212

1313
script:
1414
- echo -e "admin\ntest\ntest\nyou@example.com\nyou@example.com" | python GeoHealthCheck/models.py create
15-
- find . -name "*.py" | grep -v docs | grep -v migrations | xargs flake8
15+
- flake8
1616
- python GeoHealthCheck/models.py load tests/data/fixtures.json y
1717
- python GeoHealthCheck/models.py run
1818
- python tests/run_tests.py

GeoHealthCheck/config_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,5 @@
151151
},
152152
'OSGeo:GeoNode': {
153153
'probe_class': None
154-
}
154+
}
155155
}

GeoHealthCheck/enums.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,5 @@
8282
},
8383
'OSGeo:GeoNode': {
8484
'label': 'GeoNode instance'
85-
}
85+
}
8686
}

GeoHealthCheck/plugins/probe/owsgetcaps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class OwsGetCaps(Probe):
3838
CHECKS_AVAIL = {
3939
'GeoHealthCheck.plugins.check.checks.XmlParse': {
4040
'default': True
41-
},
41+
},
4242
'GeoHealthCheck.plugins.check.checks.NotContainsOwsException': {
4343
'default': True
4444
},

GeoHealthCheck/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def percentage(number, total):
5454
if total == 0: # no resources registered yet
5555
return 0.00
5656

57-
percentage_value = float((float(float(number)/float(total)))*100.0)
57+
percentage_value = float((float(float(number) / float(total))) * 100.0)
5858
if percentage_value in [0.0, 100.0]:
5959
return int(percentage_value)
6060
return percentage_value

0 commit comments

Comments
 (0)