Address/domain parsing class
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
It would be nice if we had a way to check if the user supplied a valid domain or ip using the same -a argument. To this end I suggest moving the cool `is_valid_hostname()` function @calebmckay created for the server to common and change it to a class which can also parse IP addrs. We can then modify it to raise an exception type that argparse handles.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the server's is_valid_hostname() function, the common module, and the argparse definition for the -a argument. Read how the current argument is validated, then determine how hostname and IP parsing should be shared and how argparse should report invalid input. Done means -a accepts valid domains and IP addresses while rejecting invalid values through argparse.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100