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

Pylint-induced maintenance #41

Merged
merged 1 commit into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ disable=
too-many-locals,
too-many-return-statements,
too-many-statements,
unnecessary-pass,
unspecified-encoding,
unused-argument,
useless-object-inheritance,
useless-option-value, # disables warning in recent pylint that does not check for no-self-use anymore

[REPORTS]
Expand Down
4 changes: 2 additions & 2 deletions picireny/antlr4/antlr_tree.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2016-2021 Renata Hodovan, Akos Kiss.
# Copyright (c) 2016-2023 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
Expand All @@ -15,7 +15,7 @@

# Parser Elements

class ANTLRElement(object):
class ANTLRElement:
def __init__(self, *, optional=False, repl=None, sep=''):
"""
Constructor of the base tree node type.
Expand Down
1 change: 0 additions & 1 deletion picireny/antlr4/hdd_tree_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class HDDHiddenToken(HDDToken):
"""
Special token type that represents tokens from hidden channels.
"""
pass


class HDDErrorToken(HDDToken):
Expand Down
6 changes: 3 additions & 3 deletions picireny/hdd_tree.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) 2007 Ghassan Misherghi.
# Copyright (c) 2016-2022 Renata Hodovan, Akos Kiss.
# Copyright (c) 2016-2023 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
Expand All @@ -10,7 +10,7 @@
from os import linesep


class Position(object):
class Position:
"""
Class defining a position in the input file. Used to recognise line breaks
between tokens.
Expand Down Expand Up @@ -51,7 +51,7 @@ def __repr__(self):
return f'{self.__class__.__name__}({self.line!r}, {self.column!r})'


class HDDTree(object):
class HDDTree:
# Node states for unparsing.
REMOVED = 0
KEEP = 1
Expand Down
4 changes: 2 additions & 2 deletions picireny/hoist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2022 Renata Hodovan, Akos Kiss.
# Copyright (c) 2021-2023 Renata Hodovan, Akos Kiss.
# Copyright (c) 2021 Daniel Vince.
#
# Licensed under the BSD 3-Clause License
Expand All @@ -14,7 +14,7 @@
logger = logging.getLogger(__name__)


class HoistingTestBuilder(object):
class HoistingTestBuilder:

def __init__(self, tree, *, with_whitespace=True):
"""
Expand Down
4 changes: 2 additions & 2 deletions picireny/prune.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021 Renata Hodovan, Akos Kiss.
# Copyright (c) 2021-2023 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
Expand All @@ -14,7 +14,7 @@
logger = logging.getLogger(__name__)


class PruningTestBuilder(object):
class PruningTestBuilder:

def __init__(self, tree, ids, *, with_whitespace=True):
"""
Expand Down