Skip to content

Commit 4ae93c5

Browse files
committed
minor cleanup
1 parent 9e5b151 commit 4ae93c5

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ jobs:
580580
with:
581581
path: dist-docs/
582582

583-
publish-wheels:
583+
publish-dist:
584584
runs-on: ubuntu-latest
585585

586586
needs: [test, test-sdist, test-system-libraw, docs]
@@ -617,7 +617,7 @@ jobs:
617617
publish-docs:
618618
runs-on: ubuntu-latest
619619

620-
needs: [publish-wheels]
620+
needs: [publish-dist]
621621

622622
permissions:
623623
pages: write # to deploy to Pages

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ readme = "README.md"
1818
authors = [
1919
{name = "Maik Riechert"}
2020
]
21-
license = {text = "MIT"}
21+
license = "MIT"
2222
classifiers = [
2323
"Development Status :: 4 - Beta",
2424
"Intended Audience :: Developers",
@@ -45,6 +45,10 @@ dependencies = [
4545

4646
[project.urls]
4747
Homepage = "https://github.com/letmaik/rawpy"
48+
Documentation = "https://letmaik.github.io/rawpy/"
49+
Repository = "https://github.com/letmaik/rawpy.git"
50+
Issues = "https://github.com/letmaik/rawpy/issues"
51+
Changelog = "https://github.com/letmaik/rawpy/releases"
4852

4953
[project.optional-dependencies]
5054
test = [

rawpy/_rawpy.pyx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ from __future__ import print_function
77
from typing import Optional, Union, Tuple, List, Any, BinaryIO
88
from numpy.typing import NDArray
99

10-
from cpython.ref cimport PyObject, Py_INCREF
10+
from cpython.ref cimport Py_INCREF
1111
from cpython.bytes cimport PyBytes_FromStringAndSize
1212
from cpython.mem cimport PyMem_Free
13-
from cython.operator cimport dereference as deref
1413
from libc.stddef cimport wchar_t
1514

1615
import numpy as np
@@ -19,8 +18,6 @@ cimport numpy as np
1918
np.import_array()
2019

2120
import os
22-
import sys
23-
import warnings
2421
from enum import Enum
2522

2623
cdef extern from "limits.h":
@@ -1323,9 +1320,4 @@ cdef class processed_image_wrapper:
13231320

13241321
def __dealloc__(self):
13251322
self.raw.p.dcraw_clear_mem(self.processed_image)
1326-
1327-
def _chars(s):
1328-
if isinstance(s, unicode):
1329-
# convert unicode to chars
1330-
s = (<unicode>s).encode('UTF-8')
1331-
return s
1323+

rawpy/enhance.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import numpy as np
1212
from numpy.typing import NDArray
1313

14-
from typing import Optional, Callable, Any, TYPE_CHECKING, cast
14+
from typing import Optional, Callable, Any, cast
1515

1616
try:
1717
from skimage.filters.rank import median as median_func
@@ -136,7 +136,6 @@ def _find_bad_pixel_candidates_generic(raw, isCandidateFn):
136136
# There exist O(log(r)) and O(1) algorithms, see https://nomis80.org/ctmf.pdf.
137137
# Also, we only need the median values for the masked pixels.
138138
# Currently, they are calculated for all pixels for each color.
139-
assert median_func is not None
140139
med = median_func(rawimg, kernel, mask=mask)
141140

142141
# detect possible bad pixels
@@ -254,7 +253,6 @@ def _repair_bad_pixels_generic(raw, coords, method='median'):
254253
# bad pixels won't influence the median in most cases and just using
255254
# the color mask prevents bad pixel clusters from producing
256255
# bad interpolated values (NaNs)
257-
assert median_func is not None
258256
smooth = median_func(rawimg, kernel, mask=color_mask)
259257
else:
260258
raise ValueError

0 commit comments

Comments
 (0)