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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: mixed-line-ending

- repo: https://github.com/PyCQA/isort
rev: 6.0.1
rev: 8.0.1
hooks:
- id: isort
files: >-
Expand All @@ -24,8 +24,8 @@ repos:
tests_unit/
)

- repo: https://github.com/psf/black
rev: 25.1.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.3.1
hooks:
- id: black
files: >-
Expand All @@ -38,12 +38,12 @@ repos:
)

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.6.0
rev: v2.20.0
hooks:
- id: pyproject-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.10
rev: v0.15.7
hooks:
- id: ruff

Expand Down
8 changes: 4 additions & 4 deletions benchmarks/aa_overhead_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ def measure_overhead(measure, title: str):
for k, v in NC_CFGS.items():
nc = init_nc(k, v)
if nc:
result_nc, time_nc = measure(nc)
_result_nc, time_nc = measure(nc)
penguin_means["Password"].append(time_nc)
else:
penguin_means["Password"].append(0)

nc_ap = init_nc_by_app_pass(k, v)
if nc_ap:
result_nc_ap, time_nc_ap = measure(nc_ap)
_result_nc_ap, time_nc_ap = measure(nc_ap)
penguin_means["AppPassword"].append(time_nc_ap)
else:
penguin_means["AppPassword"].append(0)

nc_ae = init_nc_app(k, v)
result_nc_ae, time_nc_ae = measure(nc_ae)
_result_nc_ae, time_nc_ae = measure(nc_ae)
penguin_means["AppAPI"].append(time_nc_ae)

# Uncomment only for functions that return predictable values.
Expand All @@ -48,7 +48,7 @@ def measure_overhead(measure, title: str):
width = 0.25 # the width of the bars
multiplier = 0

fig, ax = plt.subplots(layout="constrained")
_fig, ax = plt.subplots(layout="constrained")

for attribute, measurement in penguin_means.items():
offset = width * multiplier
Expand Down
2 changes: 1 addition & 1 deletion examples/as_app/to_gif/lib/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def convert_video_to_gif(input_file: FsNode, nc: NextcloudApp):
skip = 0
while True:
skip += 1
ret, frame = cap.read()
_ret, frame = cap.read()
if frame is None:
break
if skip == 2:
Expand Down
48 changes: 21 additions & 27 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Internet :: WWW/HTTP",
Expand Down Expand Up @@ -79,16 +80,14 @@ optional-dependencies.dev-min = [
urls.Changelog = "https://github.com/cloud-py-api/nc_py_api/blob/main/CHANGELOG.md"
urls.Source = "https://github.com/cloud-py-api/nc_py_api"

[tool.hatch.version]
path = "nc_py_api/_version.py"

[tool.hatch.build.targets.sdist]
include = [
[tool.hatch]
build.targets.sdist.include = [
"/nc_py_api",
"/CHANGELOG.md",
"/README.md",
]
exclude = [ ]
build.targets.sdist.exclude = []
version.path = "nc_py_api/_version.py"

[tool.black]
line-length = 120
Expand Down Expand Up @@ -126,7 +125,6 @@ lint.extend-ignore = [
"RUF100",
"S108",
]

lint.per-file-ignores."nc_py_api/__init__.py" = [
"F401",
]
Expand Down Expand Up @@ -201,41 +199,37 @@ messages_control.disable = [
"too-many-positional-arguments",
]

[tool.pytest.ini_options]
minversion = "6.0"
testpaths = [
[tool.pytest]
ini_options.minversion = "6.0"
ini_options.testpaths = [
"tests",
"tests_unit",
]
filterwarnings = [
ini_options.filterwarnings = [
"ignore::DeprecationWarning",
]
log_cli = true
addopts = "-rs --color=yes"
markers = [
ini_options.log_cli = true
ini_options.addopts = "-rs --color=yes"
ini_options.markers = [
"require_nc: marks a test that requires a minimum version of Nextcloud.",
]
asyncio_mode = "auto"
ini_options.asyncio_mode = "auto"

[tool.coverage.run]
cover_pylib = true
include = [
[tool.coverage]
run.cover_pylib = true
run.include = [
"*/nc_py_api/*",
]
omit = [
run.omit = [
"*/tests/*",
]

[tool.coverage.paths]
source = [
paths.source = [
"nc_py_api/",
"*/site-packages/nc_py_api/",
]

[tool.coverage.report]
exclude_lines = [
report.exclude_lines = [
"DEPRECATED",
"DeprecationWarning",
"pragma: no cover",
"raise NotImplementedError",
"DeprecationWarning",
"DEPRECATED",
]