Skip to content

Refactor main.py entry point#2

Open
Chocapikk wants to merge 1 commit into
NSM-Barii:mainfrom
Chocapikk:fix/main-cleanup
Open

Refactor main.py entry point#2
Chocapikk wants to merge 1 commit into
NSM-Barii:mainfrom
Chocapikk:fix/main-cleanup

Conversation

@Chocapikk

Copy link
Copy Markdown
Contributor

Cleaned up main.py:

  • Removed redundant variable assignments, argparse already handles defaults and None
  • Fixed dual-purpose variables (asn/port were used as both preset keys and actual values)
  • Extracted resolve_asn() and resolve_port() to keep main() readable
  • Replaced if/elif cascades with dict-based lookups
  • Added proper type, default and choices to argparse arguments

- Extract resolve_asn() and resolve_port() functions
- Replace if/elif cascades with dict-based presets
- Remove redundant variable assignments (argparse handles defaults)
- Add proper type/default/choices to argparse arguments
- Fix variable reuse (asn/port no longer serve dual purpose)
@Chocapikk

Copy link
Copy Markdown
Contributor Author

@NSM-Barii

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant