Page MenuHomeDevCentral

Make the FANTOIR code more pythonic
ClosedPublic

Authored by xcombelle on Nov 17 2017, 15:01.
Tags
None
Referenced Files
F3796549: D1230.id3161.diff
Thu, Nov 28, 06:39
Unknown Object (File)
Sun, Nov 24, 12:52
Unknown Object (File)
Sun, Nov 24, 12:49
Unknown Object (File)
Sun, Nov 24, 12:40
Unknown Object (File)
Sun, Nov 24, 10:55
Unknown Object (File)
Tue, Nov 19, 06:35
Unknown Object (File)
Mon, Nov 18, 05:00
Unknown Object (File)
Thu, Nov 14, 00:49
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

Lint
Lint Skipped
Unit
Tests Skipped

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.