Page MenuHomeDevCentral

Make the FANTOIR code more pythonic
ClosedPublic

Authored by xcombelle on Nov 17 2017, 15:01.
Tags
None
Referenced Files
F2742567: D1230.id3166.diff
Thu, Mar 28, 05:43
F2741811: D1230.id3162.diff
Thu, Mar 28, 02:14
F2741732: D1230.id3167.diff
Thu, Mar 28, 02:01
Unknown Object (File)
Sat, Mar 23, 02:32
Unknown Object (File)
Sat, Mar 23, 01:52
Unknown Object (File)
Sat, Mar 23, 00:01
Unknown Object (File)
Fri, Mar 22, 23:56
Unknown Object (File)
Fri, Mar 22, 22:30
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 Not Applicable
Unit
Tests Not Applicable

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
22

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.