Skip to content
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

Support mypy #13

Closed
tuukkamustonen opened this issue Feb 6, 2017 · 7 comments
Closed

Support mypy #13

tuukkamustonen opened this issue Feb 6, 2017 · 7 comments

Comments

@tuukkamustonen
Copy link

tuukkamustonen commented Feb 6, 2017

https://pypi.python.org/pypi/mypy-lang is static checker for python 3 type annotations. Example output:

fs/cs/backend/log.py: note: In member "filter" of class "CsLogFilter":
fs/cs/backend/log.py:16: error: "LogRecord" has no attribute "user_uuid"
fs/cs/backend/log.py:17: error: "LogRecord" has no attribute "tenant_id"
fs/cs/backend/errorhandler.py: note: In member "__init__" of class "CsErrorHandler":
fs/cs/backend/errorhandler.py:16: error: The return type of "__init__" must be None
fs/cs/backend/api.py: note: At top level:
fs/cs/backend/api.py:23: error: ContextManager[Any] not callable
tests/test_schema.py:864: error: Name 'test_nested_only_and_exclude' already defined

I have used ^(.*):(\d+): (.*): (.*)$ regex with warning plugin:

String fileName = matcher.group(1)
String lineNumber = matcher.group(2)
String category = matcher.group(3)
String message = matcher.group(4)
@tomasbjerre
Copy link
Owner

It should be released in all plugins now. Open issue again if any problems!

@tuukkamustonen
Copy link
Author

Thanks for super-fast actions again! Will test it tomorrow.

Btw. clicking the commit to 31b2ded01433fb8 in https://github.com/tomasbjerre/violations-lib/blob/master/CHANGELOG.md leads to 404.

@tomasbjerre
Copy link
Owner

I updated the changelog now!

@tuukkamustonen
Copy link
Author

tuukkamustonen commented Feb 7, 2017

Just installed the latest 1.43 (and restarted), but I don't see the new parsers in listing:

image

Would it be cool if plugins auto-discovered parsers in violations-lib - so you wouldn't need to update anything in plugin side (expect lib dependency version)?

@tomasbjerre
Copy link
Owner

tomasbjerre commented Feb 7, 2017 via email

@tuukkamustonen
Copy link
Author

tuukkamustonen commented Feb 7, 2017

True, either removing/re-adding build step or adding to a new job shows the new parsers.

@tuukkamustonen
Copy link
Author

Updated my job via Job DSL plugin and new parsers appeared correctly.

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

No branches or pull requests

2 participants