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

GitHub Checks API example #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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: 1 addition & 1 deletion lintly/backends/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def patch(self, url, data=None, headers=None):
return self._do_request('patch', url, json.dumps(data), headers)

def _do_request(self, method, url, data=None, extra_headers=None):
if data is None:
if data == None:
data = dict()
if extra_headers is None:
extra_headers = dict()
Expand Down
3 changes: 1 addition & 2 deletions lintly/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FAIL_ON_ANY = 'any'
FAIL_ON_NEW = 'new'
FAIL_ON_ANY = 'any'; FAIL_ON_NEW = 'new'

# Identifies that a comment came from Lintly. This is used to aid in automatically
# deleting old PR comments/reviews. This is valid Markdown that is hidden from
Expand Down
8 changes: 4 additions & 4 deletions lintly/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ def parse_violations(self, output):
path = self._normalize_path(match.group('path'))

violation = Violation(
line=int(match.group('line')),
column=int(match.group('column')),
code=match.group('code'),
message=match.group('message')
line=int(match.group('line')),
column=int(match.group('column')),
code=match.group('code'),
message=match.group('message')
)

violations[path].append(violation)
Expand Down