Skip to content

Improve plugin-related error messages #3544

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

Merged
merged 3 commits into from
Jun 20, 2017
Merged

Improve plugin-related error messages #3544

merged 3 commits into from
Jun 20, 2017

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Jun 14, 2017

Address feedback by @gvanrossum in #3517.

@JukkaL
Copy link
Collaborator Author

JukkaL commented Jun 14, 2017

The travis failure seems like a flake (see #3543).

@JukkaL JukkaL added the topic-plugins The plugin API and ideas for new plugins label Jun 14, 2017
[out]
<ROOT>/test-data/unit/plugins/noentry.py:0: error: Plugin does not define entry point function "plugin"
tmp/mypy.ini:2: error: Plugin "noentry" does not define entry point function "plugin"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and below the full filename of the plugin would make sense.

mypy/build.py Outdated
@@ -397,6 +406,24 @@ def plugin_error(message: str) -> None:
return ChainedPlugin(options.python_version, custom_plugins + [default_plugin])


def find_config_file_line_number(path: str, setting_name: str) -> int:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bummer that the ConfigFile class doesn't keep track of this. I wonder if you could at least look for sections so you only find the desired option in the [mypy] section?

@JukkaL JukkaL merged commit 870d1d8 into master Jun 20, 2017
@gvanrossum gvanrossum deleted the plugin-error-messages branch June 21, 2017 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-plugins The plugin API and ideas for new plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants