[Freeciv-tickets] [freeciv] #43927: Clean up and modernize generate_packets.py

アーカイブの一覧に戻る
OSDN Ticket System norep****@osdn*****
Sat Feb 19 22:17:18 JST 2022


#43927: Clean up and modernize generate_packets.py

  Open Date: 2022-02-19 14:17
Last Update: 2022-02-19 14:17

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/43927
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=43927

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2022-02-19 14:17 Updated by: alienvalkyrie
 * New Ticket "Clean up and modernize generate_packets.py" created


---------------------------------------------------------------------
Ticket Status:

      Reporter: alienvalkyrie
         Owner: alienvalkyrie
          Type: Tasks
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: 3.1.0
     Component: General
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

This is a meta-ticket for various tasks relating to making common/generate_packets.py more clean and concise. This is mostly a refactoring effort, though I expect some of these changes will make the script work in more contexts.
Apart from general code/style cleanup (which should happen at every step along the way), this includes:
initial cleanup: trailing whitespace, unused imports/variables, etc.
use pathlib to handle file paths (in a filesystem-agnostic way)
use argparse to handle command line arguments
use with-blocks and context managers to cleanly manage file access
use generators, list comprehensions and itertools where appropriate
(More to be added as they pop up.)

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/43927
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=43927



More information about the Freeciv-tickets mailing list
アーカイブの一覧に戻る