Page MenuHomeDevCentral

Make the FANTOIR code more pythonic
ClosedPublic

Authored by xcombelle on Nov 17 2017, 15:01.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 4, 09:39
Unknown Object (File)
Thu, Oct 31, 08:27
Unknown Object (File)
Thu, Oct 31, 03:06
Unknown Object (File)
Tue, Oct 29, 08:08
Unknown Object (File)
Sat, Oct 26, 13:58
Unknown Object (File)
Sat, Oct 26, 01:07
Unknown Object (File)
Sat, Oct 19, 12:11
Unknown Object (File)
Fri, Oct 18, 16:51
Subscribers
None

Details

Summary

Scripts with functions should allow to be included in other source files.

Apply more pythonic style. Ask forgiveness not permission.

Test Plan

Check if the behavior is unchanged.

./extract_streets.py FANTOIR1017 before.txt

git pull

./extract_streets.py FANTOIR1017 after.txt

diff before.txt after.txt

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Passed
Unit
No Test Coverage
Branch
arcpatch-D1230
Build Status
Buildable 1954
Build 2202: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Nov 17 2017, 19:15
dereckson retitled this revision from make the FANTOIR code more pythonic to Make the FANTOIR code more pythonic.Nov 17 2017, 19:24
dereckson edited the test plan for this revision. (Show Details)
dereckson requested changes to this revision.Nov 17 2017, 19:31
$ arc patch D1230
$ autopep8 ./roles/viperserv/fantoir/files/extract_streets.py > e
$ mv e ./roles/viperserv/fantoir/files/extract_streets.py
$ flake8 ./roles/viperserv/fantoir/files/extract_streets.py
./roles/viperserv/fantoir/files/extract_streets.py:17:37: F841 local variable 'output' is assigned to but never used                                           
./roles/viperserv/fantoir/files/extract_streets.py:17:80: E501 line too long (80 > 79 characters)                                                              
./roles/viperserv/fantoir/files/extract_streets.py:23:21: F821 undefined name 'fd'                                                                             
./roles/viperserv/fantoir/files/extract_streets.py:31:80: E501 line too long (83 > 79 characters)     
This revision now requires changes to proceed.Nov 17 2017, 19:31
roles/viperserv/fantoir/files/extract_streets.py
23

output.write

flake8 and correct bug fd->output

This revision is now accepted and ready to land.Nov 18 2017, 19:52
dereckson edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.