|
| 1 | +[build-system] |
| 2 | +requires = ["setuptools>=61.2"] |
| 3 | +build-backend = "setuptools.build_meta" |
| 4 | + |
| 5 | +[project] |
| 6 | +name = "scrapy-deltafetch" |
| 7 | +version = "2.0.1" |
| 8 | +authors = [{ name = "Zyte", email = "[email protected]"}] |
| 9 | +license = {text = "BSD"} |
| 10 | +description = "Scrapy middleware to ignore previously crawled pages" |
| 11 | +readme = "README.rst" |
| 12 | +classifiers = [ |
| 13 | + "Development Status :: 4 - Beta", |
| 14 | + "License :: OSI Approved :: BSD License", |
| 15 | + "Operating System :: OS Independent", |
| 16 | + "Programming Language :: Python", |
| 17 | + "Programming Language :: Python :: 3", |
| 18 | + "Programming Language :: Python :: 3.9", |
| 19 | + "Programming Language :: Python :: 3.10", |
| 20 | + "Programming Language :: Python :: 3.11", |
| 21 | + "Programming Language :: Python :: 3.12", |
| 22 | + "Programming Language :: Python :: 3.13", |
| 23 | +] |
| 24 | +requires-python = ">=3.9" |
| 25 | +dependencies = ["Scrapy>=1.1.0"] |
| 26 | + |
| 27 | +[project.urls] |
| 28 | +Homepage = "http://github.com/scrapy-plugins/scrapy-deltafetch" |
| 29 | + |
| 30 | +[tool.bumpversion] |
| 31 | +current_version = "2.0.1" |
| 32 | +commit = true |
| 33 | +tag = true |
| 34 | + |
| 35 | +[[tool.bumpversion.files]] |
| 36 | +filename = 'CHANGES.rst' |
| 37 | +search = "\\(unreleased\\)$" |
| 38 | +replace = "({now:%Y-%m-%d})" |
| 39 | +regex = true |
| 40 | + |
| 41 | +[[tool.bumpversion.files]] |
| 42 | +search = "version = \"{current_version}\"" |
| 43 | +replace = "version = \"{new_version}\"" |
| 44 | +filename = "pyproject.toml" |
| 45 | + |
| 46 | +[[tool.bumpversion.files]] |
| 47 | +filename = "scrapy_deltafetch/__init__.py" |
| 48 | + |
| 49 | +[tool.coverage.run] |
| 50 | +branch = true |
| 51 | +include = ["scrapy_deltafetch/*"] |
| 52 | +omit = ["tests/*"] |
| 53 | +disable_warnings = ["include-ignored"] |
| 54 | + |
| 55 | +[tool.coverage.paths] |
| 56 | +source = [ |
| 57 | + "scrapy_deltafetch", |
| 58 | + ".tox/**/site-packages/scrapy-deltafetch" |
| 59 | +] |
| 60 | + |
| 61 | +[tool.coverage.report] |
| 62 | +# https://github.com/nedbat/coveragepy/issues/831#issuecomment-517778185 |
| 63 | +exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:"] |
| 64 | + |
| 65 | +[tool.pylint.MASTER] |
| 66 | +persistent = "no" |
| 67 | +jobs = 1 # >1 hides results |
| 68 | + |
| 69 | +[tool.pylint."MESSAGES CONTROL"] |
| 70 | +enable = [ |
| 71 | + "useless-suppression", |
| 72 | +] |
| 73 | +disable = [ |
| 74 | + # Ones we want to ignore |
| 75 | + "attribute-defined-outside-init", |
| 76 | + "broad-exception-caught", |
| 77 | + "consider-using-with", |
| 78 | + "cyclic-import", |
| 79 | + "disallowed-name", |
| 80 | + "duplicate-code", # https://github.com/pylint-dev/pylint/issues/214 |
| 81 | + "fixme", |
| 82 | + "import-outside-toplevel", |
| 83 | + "inherit-non-class", # false positives with create_deprecated_class() |
| 84 | + "invalid-name", |
| 85 | + "invalid-overridden-method", |
| 86 | + "isinstance-second-argument-not-valid-type", # false positives with create_deprecated_class() |
| 87 | + "line-too-long", |
| 88 | + "logging-format-interpolation", |
| 89 | + "logging-fstring-interpolation", |
| 90 | + "logging-not-lazy", |
| 91 | + "missing-docstring", |
| 92 | + "no-member", |
| 93 | + "no-name-in-module", # caught by mypy already |
| 94 | + "no-value-for-parameter", # https://github.com/pylint-dev/pylint/issues/3268 |
| 95 | + "not-callable", |
| 96 | + "protected-access", |
| 97 | + "redefined-builtin", |
| 98 | + "redefined-outer-name", |
| 99 | + "too-few-public-methods", |
| 100 | + "too-many-ancestors", |
| 101 | + "too-many-arguments", |
| 102 | + "too-many-branches", |
| 103 | + "too-many-function-args", |
| 104 | + "too-many-instance-attributes", |
| 105 | + "too-many-lines", |
| 106 | + "too-many-locals", |
| 107 | + "too-many-positional-arguments", |
| 108 | + "too-many-public-methods", |
| 109 | + "too-many-return-statements", |
| 110 | + "unused-argument", |
| 111 | + "unused-import", |
| 112 | + "unused-variable", |
| 113 | + "useless-import-alias", # used as a hint to mypy |
| 114 | + "useless-return", # https://github.com/pylint-dev/pylint/issues/6530 |
| 115 | + "wrong-import-position", |
| 116 | +] |
| 117 | + |
| 118 | +[tool.ruff.lint] |
| 119 | +extend-select = [ |
| 120 | + # flake8-bugbear |
| 121 | + "B", |
| 122 | + # flake8-comprehensions |
| 123 | + "C4", |
| 124 | + # pydocstyle |
| 125 | + "D", |
| 126 | + # flake8-future-annotations |
| 127 | + "FA", |
| 128 | + # flynt |
| 129 | + "FLY", |
| 130 | + # refurb |
| 131 | + "FURB", |
| 132 | + # isort |
| 133 | + "I", |
| 134 | + # flake8-implicit-str-concat |
| 135 | + "ISC", |
| 136 | + # flake8-logging |
| 137 | + "LOG", |
| 138 | + # Perflint |
| 139 | + "PERF", |
| 140 | + # pygrep-hooks |
| 141 | + "PGH", |
| 142 | + # flake8-pie |
| 143 | + "PIE", |
| 144 | + # pylint |
| 145 | + "PL", |
| 146 | + # flake8-pytest-style |
| 147 | + "PT", |
| 148 | + # flake8-use-pathlib |
| 149 | + "PTH", |
| 150 | + # flake8-pyi |
| 151 | + "PYI", |
| 152 | + # flake8-quotes |
| 153 | + "Q", |
| 154 | + # flake8-return |
| 155 | + "RET", |
| 156 | + # flake8-raise |
| 157 | + "RSE", |
| 158 | + # Ruff-specific rules |
| 159 | + "RUF", |
| 160 | + # flake8-bandit |
| 161 | + "S", |
| 162 | + # flake8-simplify |
| 163 | + "SIM", |
| 164 | + # flake8-slots |
| 165 | + "SLOT", |
| 166 | + # flake8-debugger |
| 167 | + "T10", |
| 168 | + # flake8-type-checking |
| 169 | + "TC", |
| 170 | + # pyupgrade |
| 171 | + "UP", |
| 172 | + # pycodestyle warnings |
| 173 | + "W", |
| 174 | + # flake8-2020 |
| 175 | + "YTT", |
| 176 | +] |
| 177 | +ignore = [ |
| 178 | + # Missing docstring in public module |
| 179 | + "D100", |
| 180 | + # Missing docstring in public class |
| 181 | + "D101", |
| 182 | + # Missing docstring in public function |
| 183 | + "D103", |
| 184 | + # Missing docstring in public package |
| 185 | + "D104", |
| 186 | + # Missing docstring in magic method |
| 187 | + "D105", |
| 188 | + # Missing docstring in __init__ |
| 189 | + "D107", |
| 190 | + # One-line docstring should fit on one line with quotes |
| 191 | + "D200", |
| 192 | + # No blank lines allowed after function docstring |
| 193 | + "D202", |
| 194 | + # 1 blank line required between summary line and description |
| 195 | + "D205", |
| 196 | + # Multi-line docstring closing quotes should be on a separate line |
| 197 | + "D209", |
| 198 | + # First line should end with a period |
| 199 | + "D400", |
| 200 | + # First line should be in imperative mood; try rephrasing |
| 201 | + "D401", |
| 202 | + # First line should not be the function's "signature" |
| 203 | + "D402", |
| 204 | + # Too many return statements |
| 205 | + "PLR0911", |
| 206 | + # Too many branches |
| 207 | + "PLR0912", |
| 208 | + # Too many arguments in function definition |
| 209 | + "PLR0913", |
| 210 | + # Too many statements |
| 211 | + "PLR0915", |
| 212 | + # Magic value used in comparison |
| 213 | + "PLR2004", |
| 214 | + # Mutable class attributes should be annotated with `typing.ClassVar` |
| 215 | + "RUF012", |
| 216 | + # Use of `assert` detected |
| 217 | + "S101", |
| 218 | +] |
| 219 | + |
| 220 | +[tool.ruff.lint.per-file-ignores] |
| 221 | +# D102: Missing docstring in public method |
| 222 | +"tests/**" = ["D102"] |
| 223 | + |
| 224 | +[tool.ruff.lint.pydocstyle] |
| 225 | +convention = "pep257" |
| 226 | + |
| 227 | +[tool.setuptools] |
| 228 | +packages = ["scrapy_deltafetch"] |
0 commit comments