-
Notifications
You must be signed in to change notification settings - Fork 4
Fix some flake8 coding style issues #10
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| """Review Sublime Text packages. | ||
| """ | ||
| """Review Sublime Text packages.""" | ||
|
|
||
| __version__ = "0.2.2" | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -83,7 +83,6 @@ def test_reviewer_integration(package_path, check_runner): | |
| If all failures or warnings should be compared, | ||
| specify them in "all_failures" and "all_warnings". | ||
| """ | ||
|
|
||
| # Run checks first and report them to stdout, | ||
| # so we have something to inspect when the test fails. | ||
| check_runner.run(package_path) | ||
|
|
@@ -99,8 +98,12 @@ def test_reviewer_integration(package_path, check_runner): | |
| assert not (warning_asserts and all_warning_asserts), \ | ||
| "Only one warnings meta file is allowed" | ||
|
|
||
| assert_none = not (failure_asserts or all_failure_asserts | ||
| or warning_asserts or all_warning_asserts) | ||
| assert_none = not ( | ||
| failure_asserts or | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer having the binary operator on the new line to more clearly show its relation to the above line. I believe there is an error code for this that goes both ways, so I'll see if I can enable this check for the future. |
||
| all_failure_asserts or | ||
| warning_asserts or | ||
| all_warning_asserts | ||
| ) | ||
|
|
||
| failures = {CheckAssert(failure.message, failure.details) | ||
| for failure in check_runner.failures} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,13 @@ exclude = | |
| tests/packages, | ||
| semver.py, | ||
| max-line-length=100 | ||
| # D100 Missing docstring in public module | ||
| # D101 Missing docstring in public class | ||
| # D102 Missing docstring in public method | ||
| # D103 Missing docstring in public function | ||
| # D104 Missing docstring in public package | ||
| # D105 Missing docstring in magic method | ||
| ignore = D100, D101, D102, D103, D104, D105 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Flake8, by default, doesn't check docstrings. You must have a flake8 plugin installed in your system/environment. Also refer to the list of default errors: http://flake8.pycqa.org/en/latest/user/error-codes.html |
||
|
|
||
| [coverage:run] | ||
| # branch = True | ||
|
|
||
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 docstring is later used to generate the help message, which is sub-optimal but works. Your change introduced a random "Main." in the help message.