question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

break `commands.py` into individual files

See original GitHub issue

How would this feature be useful?

commands.py has grown to be quite large, so breaking it into file names corresponding to the command name will help reduce the barrier to entry for new devs in pipx’s codebase.

Describe the solution you’d like

Make a folder called commands and in that folder add files corresponding to each pipx command, such as commands/list_command.py, commands/install_command.py, etc.

Describe alternatives you’ve considered

Break commands.py into files in the same directory. This will make it harder to distinguish between libraries, classes and commands though, so I think putting commands in a commands dir will be the option of least astonishment.

Notes

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
itsayellowcommented, Apr 4, 2020

Closed via #382 🎉

0reactions
cs01commented, Mar 26, 2020

It’s partially done, but there are still several commands defined in commands.py. If you or anyone else reading would like to progress it further, feel free to.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Split a File into a List in Python - GeeksforGeeks
Python list slicing can be used to split a list. To begin, we read the file with the readlines() method. The file's first-half/upper...
Read more >
Splitting and Joining Files - Programming Python, Second ...
The join script simply uses os.listdir to collect all the part files in a directory created by split, and sorts the filename list...
Read more >
The Fastest Way to Split a Text File Using Python
The fastest way to split text in Python is with the split() method. This is a built-in method that is useful for separating...
Read more >
How to split a single file into multiple file of different size using ...
First, I would suggest to convert your list into a list of 2-tuples, and use integers for the numbers instead of strings.
Read more >
Commands in separate files loses arguments and options ...
When the commands are in one single file we have the commands arguments and options help description, but if we separate them in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found