forked from NOAA-EMC/obs-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pycodestyle scripts to obs-monitor (NOAA-EMC#11)
Added `pycodestyle_run.py` and related files (lifted from eva). Renamed `plotObsMon `to `plotObsMon.py` so pycodestyle_run.py could pick it up. Resolves NOAA-EMC#10 --------- Co-authored-by: Cory Martin <[email protected]>
- Loading branch information
1 parent
f2bab60
commit ba89383
Showing
5 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
|
||
extends: default | ||
|
||
rules: | ||
braces: | ||
level: warning | ||
max-spaces-inside: 1 | ||
brackets: | ||
level: warning | ||
max-spaces-inside: 1 | ||
colons: | ||
level: warning | ||
commas: | ||
level: warning | ||
comments: disable | ||
comments-indentation: disable | ||
document-start: disable | ||
empty-lines: | ||
level: warning | ||
hyphens: | ||
level: warning | ||
indentation: | ||
level: warning | ||
indent-sequences: consistent | ||
line-length: | ||
level: warning | ||
allow-non-breakable-inline-mappings: true | ||
truthy: disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This software is licensed under the terms of the Apache Licence Version 2.0 | ||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
|
||
[pycodestyle] | ||
max-line-length = 100 | ||
indent-size = 4 | ||
statistics = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env python | ||
|
||
# This software is licensed under the terms of the Apache Licence Version 2.0 | ||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
|
||
import unittest | ||
import pycodestyle | ||
|
||
|
||
# -------------------------------------------------------------------------------------------------- | ||
|
||
|
||
class TestCodeFormat(unittest.TestCase): | ||
|
||
def test_conformance(self): | ||
"""Test that we conform to PEP-8.""" | ||
style = pycodestyle.StyleGuide(config_file='pycodestyle.cfg') | ||
result = style.check_files(['.']) | ||
self.assertEqual(result.total_errors, 0, "Found code style errors (and warnings).") | ||
|
||
|
||
# -------------------------------------------------------------------------------------------------- | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters