8000 Update pylama · python-mode/python-mode@99bc092 · GitHub
[go: up one dir, main page]

Skip to content

Commit 99bc092

Browse files
committed
Update pylama
1 parent a9e2891 commit 99bc092

File tree

5 files changed

+8
-3
lines changed

5 files changed

+8
-3
lines changed

pymode/libs/pylama/config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ def parse_linters(linters):
113113
"--options", "-o", default=_Default(DEFAULT_INI_PATH),
114114
help="Select configuration file. By default is '<CURDIR>/pylama.ini'")
115115

116+
PARSER.add_argument(
117+
"--force", "-F", action='store_true', default=_Default(False),
118+
help="Force code checking (if linter doesnt allow)")
119+
116120

117121
ACTIONS = dict((a.dest, a) for a in PARSER._actions)
118122

pymode/libs/pylama/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def run(path='', code=None, options=None):
5656

5757
lname, linter = item
5858

59-
if not linter or path and not linter.allow(path):
59+
if not linter:
6060
continue
6161

6262
LOGGER.info("Run %s", lname)

pymode/libs/pylama/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def check_files(paths, options, rootpath=None, error=True):
5959
work_paths = []
6060
for path in paths:
6161

62-
if not any(l.allow(path) for _, l in options.linters):
62+
if not options.force and not any(l.allow(path) for _, l in options.linters): # noqa
6363
continue
6464

6565
if not op.exists(path):

pymode/libs/pylama/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def async_check_files(paths, options, rootpath=None):
8080
return errors
8181

8282

83-
def check_path(path, options=None, rootpath=None, code=None, **meta):
83+
def check_path(path, options=None, rootpath=None, code=None):
8484
""" Check path.
8585
8686
:return list: list of errors

pymode/lint.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def code_check():
2424
ignore=env.var('g:pymode_lint_ignore'),
2525
select=env.var('g:pymode_lint_select'),
2626
linters=env.var('g:pymode_lint_checkers'),
27+
force=1,
2728
)
2829
env.debug(options)
2930

0 commit comments

Comments
 (0)
0