Commit 51a7b595 authored by Yuri Chornoivan's avatar Yuri Chornoivan

Fix minor EBN issues

parent aa0217b2
......@@ -115,7 +115,7 @@ public:
TokenListEntry weakPop() {
m_internalPtr --;
if ( m_internalPtr < 0 ) {
return TokenListEntry(ExpressionParser::InvalidStatus, QString::null, -1);
return TokenListEntry(ExpressionParser::InvalidStatus, QString(), -1);
}
return at(m_internalPtr);
};
......
......@@ -42,4 +42,4 @@ public:
}
#endif // IMPORTFILEITEM_H
\ No newline at end of file
#endif // IMPORTFILEITEM_H
......@@ -37,7 +37,7 @@
#include <QDebug>
#include <QStandardPaths>
#include <QtTest/QTest>
#include <QTest>
using namespace KDevelop;
......
......@@ -18,7 +18,7 @@
#ifndef PYCOMPLETIONTEST_H
#define PYCOMPLETIONTEST_H
#include <QtCore/QObject>
#include <QObject>
#include <language/editor/cursorinrevision.h>
#include <language/codecompletion/codecompletioncontext.h>
......
......@@ -2,4 +2,4 @@ import matplotlib.figure
class class_Artist():
def function_set_figure(self):
l_fig = matplotlib.figure.Figure
\ No newline at end of file
l_fig = matplotlib.figure.Figure
......@@ -16,4 +16,4 @@ class class_NavigationToolbar2:
l_canvas = FigureCanvasBase()
def function_foo(self):
returns = [Figure()]
\ No newline at end of file
returns = [Figure()]
......@@ -40,7 +40,6 @@
#include <QStandardPaths>
#include <QDesktopServices>
#include <QIcon>
#include <QUrl>
#include <KMessageBox>
#include <KLocalizedString>
......
......@@ -17,8 +17,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>. *
************************************************************************/
#ifndef KCM_PY_DOCFILES_H
#define KCM_PY_DOCFILES_H
#ifndef PY_KCM_DOCFILES_H
#define PY_KCM_DOCFILES_H
#include <interfaces/configpage.h>
......
......@@ -264,4 +264,4 @@ class MatchObject:
string = "None"
SRE_Match = MatchObject
SRE_Pattern = RegexObject
\ No newline at end of file
SRE_Pattern = RegexObject
......@@ -96,7 +96,7 @@ def parseFunction(functionNode):
paramsStr.append('{} {}'.format(*p) if p[2] is NoDefaultValue else '{} {} = {}'.format(*p))
descr += '%s %s(%s)' % (retType, funcFullName, ', '.join(paramsStr))
# function parameters in function defintion
# function parameters in function definition
paramsStr = ['self'] if functionNode.parentNode.nodeName == 'Class' else [] # add `self` first parameter for methods
hadDefault = False # there has been a default argument previously
for _, argName, defaultValue in params:
......
......@@ -38,8 +38,6 @@
#include <language/duchain/declaration.h>
#include <language/duchain/duchain.h>
#include <language/duchain/types/alltypes.h>
#include <language/duchain/classdeclaration.h>
#include <language/duchain/declaration.h>
#include <language/duchain/builders/abstracttypebuilder.h>
#include <language/duchain/aliasdeclaration.h>
#include <language/duchain/duchainutils.h>
......
......@@ -55,4 +55,4 @@ FunctionDeclaration::~FunctionDeclaration()
{
}
}
\ No newline at end of file
}
......@@ -37,10 +37,7 @@
#include <functional>
#include "pythonduchainexport.h"
#include "types/unsuretype.h"
#include "declarations/functiondeclaration.h"
#include "ast.h"
using namespace KDevelop;
......
......@@ -3,4 +3,4 @@
# it should be possible to import that but it should not replace the existing
# open() function
def open():
return 3
\ No newline at end of file
return 3
......@@ -12,4 +12,4 @@ class some_class():
def member_func2(self):
baz = None
return baz
\ No newline at end of file
return baz
import time
class Foo(object):
attr = 3
\ No newline at end of file
attr = 3
......@@ -30,4 +30,4 @@ class Foo: pass
class Foo: pass
class Foo: pass
class Foo: pass
class Foo: pass
\ No newline at end of file
class Foo: pass
......@@ -31,7 +31,7 @@
#include <tests/autotestshell.h>
#include <tests/testcore.h>
#include <language/duchain/duchain.h>
#include <QtTest/QtTest>
#include <QtTest>
#include <language/backgroundparser/backgroundparser.h>
#include <interfaces/ilanguagecontroller.h>
#include <QStandardPaths>
......
......@@ -34,8 +34,8 @@
#include <tests/autotestshell.h>
#include <tests/testcore.h>
#include <language/duchain/duchain.h>
#include <QtTest/QtTest>
#include <QtWidgets/QApplication>
#include <QtTest>
#include <QApplication>
#include <language/duchain/types/functiontype.h>
#include <language/duchain/types/containertypes.h>
#include <language/duchain/aliasdeclaration.h>
......
......@@ -29,7 +29,6 @@
#include <language/editor/modificationrevision.h>
#include <language/duchain/topducontext.h>
#include <language/duchain/types/typesystem.h>
#include <language/duchain/types/typesystemdata.h>
#include <language/duchain/types/typealiastype.h>
#include <language/duchain/types/unsuretype.h>
#include <language/duchain/types/indexedtype.h>
......
......@@ -35,7 +35,7 @@ void free_ast_recursive(CodeAst *node)
AstDefaultVisitor::AstDefaultVisitor() { }
AstDefaultVisitor::~AstDefaultVisitor() { }
// The Ast "ends" here, those dont have child nodes
// The Ast "ends" here, those don't have child nodes
// note that Identifier is not a node in this Ast
void AstDefaultVisitor::visitNameConstant(NameConstantAst* node) { Q_UNUSED(node); }
void AstDefaultVisitor::visitPass(PassAst* node) { Q_UNUSED(node); }
......
......@@ -19,7 +19,7 @@
#ifndef PYTHON_PARSESESSION_H
#define PYTHON_PARSESESSION_H
#include <QtCore/QString>
#include <QString>
#include "parserexport.h"
#include <language/duchain/duchainpointer.h>
......
......@@ -48,4 +48,4 @@
// remove evil macros from headers which pollute the namespace (grr!)
#undef test
#undef decorators
#undef Attribute
\ No newline at end of file
#undef Attribute
......@@ -43,7 +43,7 @@
#include <ktexteditor_version.h>
#include <QDebug>
#include <QtTest/QtTest>
#include <QtTest>
using namespace Python;
......
......@@ -35,7 +35,7 @@
#include <ktexteditor_version.h>
#include <QDebug>
#include <QtTest/QtTest>
#include <QtTest>
using namespace Python;
......
......@@ -21,7 +21,6 @@
#include <language/duchain/declaration.h>
#include <language/duchain/types/abstracttype.h>
#include <language/duchain/declaration.h>
using namespace KDevelop;
......
......@@ -47,7 +47,6 @@
#include <interfaces/iprojectcontroller.h>
#include <interfaces/ilanguagecontroller.h>
#include <interfaces/idocumentcontroller.h>
#include <interfaces/iprojectcontroller.h>
#include <util/foregroundlock.h>
#include <project/projectmodel.h>
#include <util/path.h>
......
......@@ -115,7 +115,7 @@ class TestRunner():
fatal_fail = re.match(r"(QFATAL|ASSERT)\s*", line)
if fatal_fail:
print(self.data)
print(red("Fatal error occured, aborting"))
print(red("Fatal error occurred, aborting"))
return
passed, failed = len(self.passed_tests), len(self.failed_tests)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment