-
Notifications
You must be signed in to change notification settings - Fork 23
Aliaksei Karatynski #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
astronomer-alkor
wants to merge
18
commits into
PythonAndGoCommunity:master
Choose a base branch
from
astronomer-alkor:dev
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
3e2ed9b
update CI script and hometask
AliakseiBuziuma 7fffab0
Merge remote-tracking branch 'upstream/master'
astronomer-alkor a53cf47
add pycalc
astronomer-alkor 6ea7324
remove tests
astronomer-alkor c9ae1f8
fix setup
astronomer-alkor 5c49201
remove setup
astronomer-alkor 0ca1dd4
change version
astronomer-alkor 03090b6
fix imports
astronomer-alkor 3f41c81
add tests & code refactoring
astronomer-alkor 91fd339
fix bug
astronomer-alkor f504e6d
add tests
astronomer-alkor 9f96f03
fix bug
astronomer-alkor 19ef8e3
code refactor
astronomer-alkor 1794931
code refactor
astronomer-alkor 0ccfeba
code refactor
astronomer-alkor 8dbbade
code refactor
astronomer-alkor ab336d8
fix bug
astronomer-alkor bf0a645
fix bug
astronomer-alkor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| """ | ||
| This module allows to work with command line arguments | ||
| """ | ||
| import argparse | ||
|
|
||
|
|
||
| def arg_parser(): | ||
| """ | ||
| Parse arguments of command line | ||
| :return: arguments of command line | ||
| """ | ||
| parser = argparse.ArgumentParser(description='Pure-python command-line calculator.') | ||
| parser.add_argument('EXPRESSION', help='expression string to evaluate') | ||
| parser.add_argument('-m', '--use-modules', nargs='+', dest='MODULE', help='additional modules to use') | ||
|
|
||
| return parser.parse_args() | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Согласно негласным соглашениям хорошим тоном считается давать функциям названия, выражающие действие (глагол). Название
parse_argsподошло бы лучше.Кроме того, объем и сложность логики данной функции очень малы для вынесения в отдельный модуль. Обычно такую функцию называют
_parse_argsи располагают в модуле, являющемся точкой входа приложения.