Skip to content

Commit

Permalink
fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
zoumingzhe committed Apr 25, 2024
1 parent b3840eb commit d3d2c7c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
5 changes: 0 additions & 5 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,3 @@ disable=
C0114, # missing-module-docstring
C0115, # missing-class-docstring
C0116, # missing-function-docstring
R0903, # too-few-public-methods
R0904, # too-many-public-methods
R0913, # too-many-arguments
R0914, # too-many-locals
R0915, # too-many-statements
4 changes: 2 additions & 2 deletions xarg/colorful.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from colorama.ansi import code_to_chars


class AnsiXStyle(AnsiStyle):
class AnsiXStyle(AnsiStyle): # pylint: disable=too-few-public-methods
ITALIC = 3
UNDERLINE = 4
SLOWBLINK = 5
Expand Down Expand Up @@ -42,7 +42,7 @@ class AnsiXStyle(AnsiStyle):
}


class color(str):
class color(str): # pylint: disable=too-many-public-methods
'''Colorful terminal text
Reference: https://en.wikipedia.org/wiki/ANSI_escape_code
Expand Down
2 changes: 1 addition & 1 deletion xarg/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class argp(ArgumentParser):
'''Simple command-line tool based on argparse.
'''

def __init__(self,
def __init__(self, # pylint: disable=too-many-arguments
argv: Optional[Sequence[str]] = None,
prog: Optional[str] = None,
usage: Optional[str] = None,
Expand Down
6 changes: 3 additions & 3 deletions xarg/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class scanner:
'''scan objects
'''

class object:
class object: # pylint: disable=too-many-public-methods

def __init__(self, path: str):
assert isinstance(path, str)
Expand Down Expand Up @@ -177,7 +177,7 @@ def add(self, obj: object):
self.__objregs.add(obj)

@classmethod
def load(cls,
def load(cls, # pylint: disable=R0913,R0914,R0915
paths: Sequence[str],
exclude: Optional[Sequence[str]] = None,
linkdir: bool = True,
Expand Down Expand Up @@ -207,7 +207,7 @@ def path_filter() -> Set[str]:

return filter_paths

class task_stat:
class task_stat: # pylint: disable=too-few-public-methods

def __init__(self):
self.exit = False
Expand Down

0 comments on commit d3d2c7c

Please sign in to comment.