Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ardumont/swh-loader-core
  • vlorentz/swh-loader-core
  • franckbret/swh-loader-core
  • KShivendu/swh-loader-core
  • lunar/swh-loader-core
  • anlambert/swh-loader-core
  • olasd/swh-loader-core
  • swh/devel/swh-loader-core
  • Alphare/swh-loader-core
  • douardda/swh-loader-core
  • marmoute/swh-loader-core
11 results
Show changes
Commits on Source (3)
# Changes here will be overwritten by Copier
_commit: v0.2.3
_commit: v0.3.3
_src_path: https://gitlab.softwareheritage.org/swh/devel/swh-py-template.git
description: Software Heritage core and package loaders
distribution_name: swh-loader-core
......
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: check-json
- id: check-yaml
- repo: https://github.com/python/black
rev: 24.8.0
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
rev: 6.0.0
hooks:
- id: isort
......@@ -20,17 +20,17 @@ repos:
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear==24.4.26]
additional_dependencies: [flake8-bugbear==24.12.12, flake8-pyproject]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.4.1
hooks:
- id: codespell
name: Check source code spelling
additional_dependencies:
- tomli
exclude: ^(swh/loader/.*/tests/data/.*)$
stages: [commit]
stages: [pre-commit]
- id: codespell
name: Check commit message spelling
additional_dependencies:
......
......@@ -100,7 +100,7 @@ Here is an overview of the fields (+ internal version name + branch name) used b
- Synthetic release for Crate source package {p_info.name} version {p_info.version}
- true
- from intrinsic metadata
- from extrinsinc metadata
- from extrinsic metadata
- ""
* - debian
- =``version``
......
[mypy]
namespace_packages = True
warn_unused_ignores = True
explicit_package_bases = True
# ^ Needed for mypy to detect py.typed from swh packages installed
# in editable mode
# 3rd party libraries without stubs (yet)
[mypy-celery.*]
ignore_missing_imports = True
[mypy-chardet.*]
ignore_missing_imports = True
[mypy-debian.*]
ignore_missing_imports = True
[mypy-iso8601.*]
ignore_missing_imports = True
[mypy-pkginfo.*]
ignore_missing_imports = True
[mypy-psutil.*]
ignore_missing_imports = True
[mypy-psycopg2.*]
ignore_missing_imports = True
[mypy-requests_mock.*]
ignore_missing_imports = True
[mypy-retrying.*]
ignore_missing_imports = True
# [mypy-add_your_lib_here.*]
# ignore_missing_imports = True
......@@ -83,3 +83,36 @@ known_first_party = ['swh']
[tool.codespell]
ignore-words-list = "iff,crate"
[tool.mypy]
namespace_packages = true
warn_unused_ignores = true
explicit_package_bases = true
# ^ Needed for mypy to detect py.typed from swh packages installed
# in editable mode
plugins = []
# 3rd party libraries without stubs (yet)
# [[tool.mypy.overrides]]
# module = [
# "package1.*",
# "package2.*",
# ]
# ignore_missing_imports = true
[tool.flake8]
select = ["C", "E", "F", "W", "B950"]
ignore = [
"E203", # whitespaces before ':' <https://github.com/psf/black/issues/315>
"E231", # missing whitespace after ','
"E501", # line too long, use B950 warning from flake8-bugbear instead
"W503", # line break before binary operator <https://github.com/psf/black/issues/52>
"E704" # multiple statements on one line
]
max-line-length = 88
[tool.pytest.ini_options]
norecursedirs = "build docs .*"
asyncio_mode = "strict"
consider_namespace_packages = true
[pytest]
norecursedirs = build docs .*
asyncio_mode = strict
markers =
db: marks tests as using a db (deselect with '-m "not db"')
fs: marks tests as using the filesystem (deselect with '-m "not fs"')
consider_namespace_packages = true
celery-types
pytest
pytest-mock
requests_mock >= 1.11.0
......@@ -8,5 +9,6 @@ swh-storage[testing] >= 2.4.1
swh-vault >= 1.12.2
types-click
types-python-dateutil
types-psutil
types-pyyaml
types-requests
[flake8]
# E203: whitespaces before ':' <https://github.com/psf/black/issues/315>
# E231: missing whitespace after ','
# E501: line too long, use B950 warning from flake8-bugbear instead
# W503: line break before binary operator <https://github.com/psf/black/issues/52>
select = C,E,F,W,B950
ignore = E203,E231,E501,E704,W503
max-line-length = 88
......@@ -342,7 +342,7 @@ def assert_task_and_visit_type_match(tasks_module_name: str) -> None:
visit_type = loader_cls.visit_type
task_function_name = f"load_{visit_type.replace('-', '_')}"
assert task_function_name in task_names, (
f"task function {task_function_name} for visit type {visit_type } "
f"task function {task_function_name} for visit type {visit_type} "
f"is missing in {tasks_module_name}"
)
......
......@@ -26,7 +26,7 @@ commands =
[testenv:black]
skip_install = true
deps =
black==24.8.0
black==25.1.0
commands =
{envpython} -m black --check swh
......@@ -34,8 +34,10 @@ commands =
skip_install = true
deps =
flake8==7.1.1
flake8-bugbear==24.4.26
flake8-bugbear==24.12.12
flake8-pyproject==1.2.3
pycodestyle==2.12.1
commands =
{envpython} -m flake8
......@@ -43,7 +45,7 @@ commands =
extras =
testing
deps =
mypy==1.11.1
mypy==1.15.0
commands =
mypy swh
......