Page MenuHomeDevCentral

Make the FANTOIR code more pythonic
ClosedPublic

Authored by xcombelle on Nov 17 2017, 15:01.
Tags
None
Referenced Files
F3101436: D1230.diff
Fri, Jun 14, 23:54
Unknown Object (File)
Thu, Jun 13, 03:49
Unknown Object (File)
Tue, Jun 11, 11:50
Unknown Object (File)
Tue, Jun 11, 04:22
Unknown Object (File)
Tue, Jun 11, 03:12
Unknown Object (File)
Tue, Jun 11, 03:10
Unknown Object (File)
Sun, Jun 9, 21:05
Unknown Object (File)
Sun, Jun 9, 17:10
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.