Skip to content

Refactor tests and metadata #317

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

Merged
merged 5 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
update fields of pyproject.toml
* merge pylint config
* make version dynamic
* better list of maintainers and major authors
* remove "test" extra which now just duplicates "dev"
* remove weird duplicated "testing" extra
* remove setuptools—a build-system.requires—from optional requirements
* remove unneeded pytest alias
* more and better keywords (this is PyPI, we don't need a "Python" keyword
* shorter desc
  • Loading branch information
aaronliu0130 committed Mar 11, 2025
commit 1e31b4a6aef5e319d33689ac71c6014921dccb9f
49 changes: 0 additions & 49 deletions .pylintrc

This file was deleted.

91 changes: 66 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@ requires = [ "setuptools>=61.2" ]

[project]
name = "cpplint"
version = "2.0.0"
description = "Automated checker to ensure C++ files follow Google's style guide"
description = "Check C++ files configurably against Google's style guide"
readme = "README.rst"
keywords = [ "c++", "lint", "python" ]
keywords = [ "c++", "cpp", "google style", "lint" ]
license = { text = "BSD-3-Clause" }
maintainers = [ { name = "cpplint Developers" } ]
maintainers = [
{ name = "Aaron Liu", email = "aaronliu0130@gmail.com" },
{ name = "Christian Clauss", email = "cclauss@me.com" },
{ name = "John Vandenberg", email = "jayvdb@gmail.com" },
]
authors = [
{ name = "Google Inc." },
{ name = "Thibault Kruse" },
{ name = "Andrew Davis", email = "theandrewdavis@gmail.com" },
{ name = "cpplint developers" },
]
requires-python = ">=3.8"
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -28,6 +37,7 @@ classifiers = [
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Quality Assurance",
]
dynamic = [ "version" ]
dependencies = [ ]

optional-dependencies.dev = [
Expand All @@ -36,33 +46,16 @@ optional-dependencies.dev = [
"pytest",
"pytest-cov",
"pytest-timeout",
"setuptools",
"testfixtures",
"tox<5",
]
optional-dependencies.test = [
"parameterized",
"pytest",
"pytest-cov",
"pytest-timeout",
"testfixtures",
"tox<5",
]
optional-dependencies.testing = [
"parameterized",
"pytest",
"pytest-cov",
"pytest-timeout",
"testfixtures",
"tox<5",
]
urls.Download = "https://github.com/cpplint/cpplint"
urls.Homepage = "https://github.com/cpplint/cpplint"
scripts.cpplint = "cpplint:main"

[tool.setuptools]
py-modules = [ "cpplint" ]
include-package-data = false
dynamic.version = { attr = "cpplint.__VERSION__" }

[tool.ruff]
target-version = "py38"
Expand Down Expand Up @@ -143,13 +136,61 @@ lint.per-file-ignores."cpplint.py" = [ "ICN001", "PERF401" ]
lint.per-file-ignores."cpplint_unittest.py" = [ "FLY002" ]
lint.mccabe.max-complexity = 29

[tool.pylint.basic]
include-naming-hint = true
method-rgx = "[A-Z_][A-Za-z0-9]{2,49}$|__init__|__str__|__contains__"
function-rgx = "[A-Z_][A-Za-z0-9]{2,49}$|main"
const-rgx = "[a-zA-Z_][A-Za-z0-9_]{2,49}$"
variable-rgx = "[a-z_][a-z0-9_]{0,49}$"
argument-rgx = "[a-z_][a-z0-9_]{0,49}$"
class-rgx = "[A-Z_][a-zA-Z0-9]+$|basestring|unicode|long|xrange"

[tool.pylint.messages-control]
disable = [
"global-statement",
"multiple-statements",
"missing-docstring",
"no-else-return",
"no-self-use",
"consider-merging-isinstance",
"consider-using-min-builtin",
"bad-continuation",
"fixme",
"bad-option-value",
"anomalous-unicode-escape-in-string",
"unused-argument",
"useless-object-inheritance",
"consider-using-dict-comprehension",
"consider-using-in",
"unnecessary-pass",
"too-many-positional-arguments",
]

[tool.pylint.reports]
output-format = "colorized"
reports = false
score = false

[tool.pylint.format]
indent-string = ' '
indent-after-paren = 4
max-module-lines = 10000

[tool.pylint.design]
max-locals = 25
max-line-length = 100
max-attributes = 10
max-branches = 30
max-args = 20
max-statements = 75
max-returns = 10
min-public-methods = 0
max-bool-expr = 10

[tool.pytest.ini_options]
python_files = [ "*test.py" ]
testpaths = [ "." ]
required_plugins = [ "pytest-cov", "pytest-timeout" ]
timeout = 60
# fail if coverage is under 90%
addopts = "--color=yes --cov-fail-under=90 --cov=cpplint"

[tool.aliases]
test = "pytest"
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy