-
Notifications
You must be signed in to change notification settings - Fork 443
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
Update dodo.py #3746
Update dodo.py #3746
Conversation
Added script annotations to functions
@@ -8,45 +8,45 @@ | |||
} | |||
|
|||
|
|||
def recursive_glob(path, pattern): | |||
def recursive_glob(path, pattern) -> str: |
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.
This function does not return a single string.
"""recursively walk path directories and return files matching the pattern""" | ||
for root, dirnames, filenames in os.walk(path, followlinks=True): | ||
for filename in fnmatch.filter(filenames, pattern): | ||
yield os.path.join(root, filename) | ||
|
||
|
||
def task_flake8(): | ||
def task_flake8() -> str: |
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.
This function does not return a string.
"""flake8 - static check for python files""" | ||
yield { | ||
'name': os.path.join(os.getcwd(), 'nikola'), | ||
'actions': ['flake8 nikola/'], | ||
} | ||
|
||
|
||
def task_pydocstyle(): | ||
def task_pydocstyle() -> str: |
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.
This function does not return a string.
"""pydocstyle -- static check for docstring style""" | ||
yield { | ||
'name': os.path.join(os.getcwd(), 'nikola'), | ||
'actions': ["pydocstyle --count --match-dir='(?!^\\.)(?!data).*' nikola/"], | ||
} | ||
|
||
|
||
def task_test(): | ||
def task_test() -> str: |
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.
This function does not return a string.
"""run unit-tests using py.test""" | ||
return { | ||
'actions': ['py.test tests/'], | ||
} | ||
|
||
|
||
def task_coverage(): | ||
def task_coverage() -> str: |
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.
This function does not return a string.
} | ||
|
||
|
||
def task_gen_completion(): | ||
def task_gen_completion() -> str: |
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.
This function does not return a string.
"""run unit-tests using py.test, with coverage reporting""" | ||
return { | ||
'actions': ['py.test --cov nikola --cov-report term-missing tests/'], | ||
'verbosity': 2, | ||
'verbosity' int: 2, |
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.
This is invalid syntax.
Super apologetic here, just getting started and I want to help. I'll take a look at things before I re-submit changes you've requested |
It is OK to make mistakes. It is also important to test your changes before opening a pull request. For type annotations, this would mean checking the code with |
Pull Request Checklist
Description
Added script annotations to functions