GeezerVison is showing github.com — Fix support for Python 3.12 · cpplint/cpplint@0e85508
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/workflows/ci.yml +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 5 | 5 | runs-on: ubuntu-latest | 6 | 6 | strategy: | 7 | 7 | matrix: | 8 | | - python-version: ['3.9', 'pypy3.10', '3.11'] | | 8 | + python-version: ['3.9', 'pypy3.10', '3.11', '3.12'] | 9 | 9 | fail-fast: false | 10 | 10 |
| 11 | 11 | steps: | |
Collapse file Copy file name to clipboardExpand all lines: CONTRIBUTING.rst +5-5Lines changed: 5 additions & 5 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -62,11 +62,11 @@ You can setup your local environment for developing patches for cpplint like thi | 62 | 62 | # run a single CLI integration test | 63 | 63 | pytest --no-cov cpplint_clitest.py -k testSillySample | 64 | 64 | # run all tests | 65 | | - ./setup.py test | 66 | | - ./setup.py lint | 67 | | - ./setup.py ci # all the above | 68 | | - ./flake8 | 69 | | - tox # all of the above in all python environments | | 65 | + pytest | | 66 | + pylint cpplint.py | | 67 | + flake8 | | 68 | + # all of the above in all python environments | | 69 | + tox | 70 | 70 |
| 71 | 71 | Releasing | 72 | 72 | --------- | |
Collapse file Copy file name to clipboardExpand all lines: cpplint_unittest.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -935,7 +935,7 @@ def testIncludeWhatYouUseNoImplementationFiles(self): | 935 | 935 | code = 'std::vector<int> foo;' | 936 | 936 | for extension in ['h', 'hpp', 'hxx', 'h++', 'cuh', | 937 | 937 | 'c', 'cc', 'cpp', 'cxx', 'c++', 'cu']: | 938 | | - self.assertEquals('Add #include <vector> for vector<>' | | 938 | + self.assertEqual('Add #include <vector> for vector<>' | 939 | 939 | ' [build/include_what_you_use] [4]', | 940 | 940 | self.PerformIncludeWhatYouUse(code, 'foo.' + extension)) | 941 | 941 |
| |
Collapse file Copy file name to clipboard +1-37Lines changed: 1 addition & 37 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | #! /usr/bin/env python | 2 | | - | 3 | | -from setuptools import setup, Command | 4 | | -from subprocess import check_call | 5 | | -from distutils.spawn import find_executable | | 2 | +from setuptools import setup | 6 | 3 | import cpplint as cpplint | 7 | 4 |
| 8 | | -class Cmd(Command): | 9 | | - ''' | 10 | | - Superclass for other commands to run via setup.py, declared in setup.cfg. | 11 | | - These commands will auto-install setup_requires in a temporary folder. | 12 | | - ''' | 13 | | - user_options = [ | 14 | | - ('executable', 'e', 'The executable to use for the command') | 15 | | - ] | 16 | | - | 17 | | - def initialize_options(self): | 18 | | - self.executable = find_executable(self.executable) | 19 | | - | 20 | | - def finalize_options(self): | 21 | | - pass | 22 | | - | 23 | | - def execute(self, *k): | 24 | | - check_call((self.executable,) + k) | 25 | | - | 26 | | - | 27 | | -class Lint(Cmd): | 28 | | - '''run with python setup.py lint''' | 29 | | - description = 'Run linting of the code' | 30 | | - user_options = Cmd.user_options + [ | 31 | | - ('jobs', 'j', 'Use multiple processes to speed up the linting') | 32 | | - ] | 33 | | - executable = 'pylint' | 34 | | - | 35 | | - def run(self): | 36 | | - self.execute('cpplint.py') | 37 | | - | 38 | 5 | # some pip versions bark on comments (e.g. on travis) | 39 | 6 | def read_without_comments(filename): | 40 | 7 | with open(filename) as f: | @@ -78,7 +45,4 @@ def read_without_comments(filename): | 78 | 45 | extras_require={ | 79 | 46 | 'test': test_required, | 80 | 47 | 'dev': read_without_comments('dev-requirements') + test_required | 81 | | - }, | 82 | | - cmdclass={ | 83 | | - 'lint': Lint | 84 | 48 | }) |
Collapse file Copy file name to clipboardExpand all lines: test-requirements -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 2 | 2 | # 5.x requires python 3.5 | 3 | 3 | pytest | 4 | 4 | pytest-cov | 5 | | -# freeze versions breaking python 2.7 on travis | 6 | 5 | testfixtures |
Collapse file Copy file name to clipboardExpand all lines: tox.ini +5-4Lines changed: 5 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -# also see gitlab ci.yml | 2 | 1 | [tox] | 3 | 2 | envlist = py39, py310, py312, pypy3 | 4 | 3 |
| @@ -16,9 +15,11 @@ deps = | 16 | 15 | pylint>=2.11.0 | 17 | 16 | flake8-polyfill | 18 | 17 | pytest | | 18 | + pytest-cov | | 19 | + testfixtures | 19 | 20 | setuptools==58.2.0 | 20 | 21 |
| 21 | 22 | commands = | 22 | | - {envpython} setup.py test | 23 | | - {envpython} setup.py lint | 24 | | - {envpython} -m flake8 | | 23 | + {envpython} -m pytest | | 24 | + {envpython} -m pylint cpplint.py | | 25 | + {envpython} -m flake8 |
|