Skip to content
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: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ ignore =
E128,
# unexpected indentation
E116,
# continuation line unaligned for hanging indent
E131,
# too many blank lines
E303,
# missing whitespace around arithmetic operator
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ repos:
additional_dependencies:
- tomli

- repo: https://github.com/pycqa/flake8
rev: 7.1.2
hooks:
- id: flake8

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.5.1
hooks:
Expand Down
3 changes: 2 additions & 1 deletion cpplint_unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ def PerformIncludeWhatYouUse(self, code, filename='foo.h', io=codecs):
# Perform lint and make sure one of the errors is what we want
def TestLintContains(self, code, expected_message):
self.assertTrue(expected_message in self.PerformSingleLineLint(code))

def TestLintNotContains(self, code, expected_message):
self.assertFalse(expected_message in self.PerformSingleLineLint(code))

Expand Down Expand Up @@ -1150,7 +1151,7 @@ def testIncludeWhatYouUse(self):
"""#include "base/foobar.h"
boost::range::transform(input, std::back_inserter(output), square);
""",
'') # Avoid false positives on transform in other namespaces.
'') # Avoid false positives on transform in other namespaces.
self.TestIncludeWhatYouUse(
"""#include "base/foobar.h"
bool foobar = std::min_element(a.begin(), a.end());
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ classifiers = [
dependencies = [ ]

optional-dependencies.dev = [
"flake8>=4.0.1",
"parameterized",
"pylint>=2.11",
"pytest",
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ extras = dev
commands =
{envpython} -m pytest {posargs:}
{envpython} -m pylint cpplint.py
{envpython} -m flake8 cpplint.py
Loading