-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show all linting errors, not just the first one.
- Loading branch information
1 parent
15994ad
commit 5095180
Showing
4 changed files
with
23 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
from __future__ import annotations | ||
import sys | ||
|
||
from . import linters | ||
from . import my_linter | ||
|
||
def main() -> None: | ||
if not __debug__: | ||
raise RuntimeError("Python isn't running in the default debug mode.") | ||
if (result := linters.run_linters()) != linters.LintResult.SUCCESS: | ||
print(f"Error: {result.name}") | ||
sys.exit(0) | ||
print('\nvulture, mypy, vermin, and pylint found no errors.') | ||
print('Also, all python files have a future annotations import at the top, and ', end='') | ||
print('all functions have a return type annotation.\n') | ||
my_linter.main() | ||
if errors := linters.run_linters(): | ||
for error in errors: | ||
print(f"Error: {error.name}") | ||
else: | ||
print('\nvulture, mypy, vermin, and pylint found no errors.') | ||
print('Also, all python files have a future annotations import at the top, and ', end='') | ||
print('all functions have a return type annotation.\n') | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains 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
This file contains 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