Open Kristinita opened 7 years ago
+1 I also have this issue (Sublime Text Build 3126 on Linux Mint 17.1) using python 2 code. The package control of sublime told me it's flake8 2.4.3 though.
Okay, I found out how to "solve" this. Seems to be some specification of the formatting of a Python script? This won't work:
# coding=utf-8
print 'Hello world!'
but this:
# coding=utf-8
"""
This is an example script.
It seems that it has to have THIS docstring with a summary line, a blank line
and sume more text like here. Wow.
"""
print 'Hello world!'
So the missing docstring is the comment block with a single line + blank line + text, which seems to be needed so that the warning does not occur with flake8 here.
single line + blank line + text = fix
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
This is an example script.
It seems that it has to have THIS docstring with a summary line, a blank line
and sume more text like here. Wow.
"""
print("ok")
So, is it necessary to put in these first lines in each Python file to avoid this error? Is this a bug or is it actually the wrong style to leave this head out?
I remove Flake8Lint and migrate to Anaconda. It supports flake8 linting.
Thanks.
Many thanks for this hint! (=
go to "settings.json" and disable python pydocstyle by doing that it worked for me "python.linting.pydocstyleEnabled": false
1. Summary
In valid
py
file I get warningD100: Missing docstring in public module
.2. Settings
My
pelicanconf.py
:3. Steps to reproduce
I reproduce the problem in a version of Sublime Text without plugins and user settings.
I install Flake8Lint → I restart Sublime Text → I open
pelicanconf.py
.4. Expected behavior
If I check my file in a terminal:
Also, I don't get a warning, if I use SublimeLinter-flake8 package.
5. Actual behavior
6. Environment
Operating system and version: Windows 10 Enterprise LTSB 64-bit EN Sublime Text: Build 3126 Python: 3.6.1 Flake8: 3.3.0 (mccabe: 0.6.1, pycodestyle: 2.3.1, pyflakes: 1.5.0) CPython 3.6.1 on Windows
Thanks.