Skip to content

Commit

Permalink
style(pre-commit): bump linters
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKevJames committed Feb 23, 2019
1 parent a9b5e30 commit 9e5761d
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 18 deletions.
43 changes: 34 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
sha: v1.2.3
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
- id: check-ast
- id: check-builtin-literals
Expand All @@ -9,34 +9,59 @@ repos:
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-xml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
args: [--allow-multiple-documents]
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
exclude: example/*
- id: file-contents-sorter
files: .dockerignore .gitignore
- id: mixed-line-ending
args: [--fix=lf]
- id: name-tests-test
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: git://github.com/pre-commit/mirrors-pylint
sha: v1.8.2
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v2.2.2
hooks:
- id: pylint
args:
- --max-line-length=79
- --ignore-imports=yes
- -d fixme
- -d import-error
- -d invalid-name
- -d locally-disabled
- -d missing-docstring
- -d too-few-public-methods
- -d useless-object-inheritance
exclude: example/*
- repo: git://github.com/Lucas-C/pre-commit-hooks
sha: v1.1.4
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.6
hooks:
- id: remove-tabs
- repo: git://github.com/asottile/reorder_python_imports
sha: v1.0.1
- repo: https://github.com/asottile/reorder_python_imports
rev: v1.3.5
hooks:
- id: reorder-python-imports
args: [--py26-plus]
files: coveralls/*
- repo: https://github.com/asottile/yesqa
rev: v0.0.9
hooks:
- id: yesqa
files: coveralls/*
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.4.3
hooks:
- id: autopep8
files: coveralls/*

This comment has been minimized.

Copy link
@asottile

asottile Feb 24, 2019

Contributor

oops, this matches coveralls or coveralls/ or coveralls/////////////////// (these are regexes not globs)

This comment has been minimized.

Copy link
@TheKevJames

TheKevJames Feb 24, 2019

Author Owner

Oh, wow, I've definitely made this mistake in a bunch of places, then! I see this is true for both files and exclude in all cases. Looks like I've got some updates to make -- thanks for calling this out!

This comment has been minimized.

Copy link
@TheKevJames

TheKevJames Feb 24, 2019

Author Owner

Fixed in d9e27fe

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.2.0
hooks:
- id: python-no-log-warn
- id: python-use-type-annotations
- id: rst-backticks
1 change: 1 addition & 0 deletions coveralls/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
class CoverallReporter(Reporter):
""" Custom coverage.py reporter for coveralls.io
"""

def __init__(self, *args, **kwargs):
self.source_files = []
super(CoverallReporter, self).__init__(*args, **kwargs)
Expand Down
11 changes: 6 additions & 5 deletions tests/api/configuration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,12 @@ def test_circleci_no_config(self):
assert cover.config['service_job_id'] == '888'
assert cover.config['service_pull_request'] == '9999'

@mock.patch.dict(os.environ,
{'JENKINS_HOME': '/var/lib/jenkins',
'BUILD_NUMBER': '888',
'CI_PULL_REQUEST': 'https://github.com/org/repo/pull/9999'},
clear=True)
@mock.patch.dict(
os.environ,
{'JENKINS_HOME': '/var/lib/jenkins',
'BUILD_NUMBER': '888',
'CI_PULL_REQUEST': 'https://github.com/org/repo/pull/9999'},
clear=True)
def test_jenkins_no_config(self):
cover = Coveralls(repo_token='xxx')
assert cover.config['service_name'] == 'jenkins'
Expand Down
1 change: 0 additions & 1 deletion tests/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import mock

import coveralls
import coveralls.cli
from coveralls.exception import CoverallsException

Expand Down
6 changes: 3 additions & 3 deletions tests/git_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def correct_encoding_for_envvars(value):
try:
str(value)
except UnicodeEncodeError:
value = value.encode("utf8")
value = value.encode('utf8')
return value


Expand All @@ -91,8 +91,8 @@ class GitInfoTestEnvVars(unittest.TestCase):
'GIT_BRANCH': 'master',
'GIT_AUTHOR_NAME': correct_encoding_for_envvars(GIT_NAME),
'GIT_AUTHOR_EMAIL': correct_encoding_for_envvars(GIT_EMAIL),
'GIT_COMMITTER_NAME':correct_encoding_for_envvars(GIT_NAME),
'GIT_COMMITTER_EMAIL':correct_encoding_for_envvars(GIT_EMAIL),
'GIT_COMMITTER_NAME': correct_encoding_for_envvars(GIT_NAME),
'GIT_COMMITTER_EMAIL': correct_encoding_for_envvars(GIT_EMAIL),
'GIT_MESSAGE': correct_encoding_for_envvars(GIT_COMMIT_MSG),
'GIT_URL': correct_encoding_for_envvars(GIT_URL),
'GIT_REMOTE': correct_encoding_for_envvars(GIT_REMOTE),
Expand Down

0 comments on commit 9e5761d

Please sign in to comment.