Skip to content

Commit 26603de

Browse files
Apply ruff:pyupgrade rule UP025
UP025 Remove unicode literals from strings
1 parent bccaf70 commit 26603de

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

doc/source/conf.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
master_doc = 'index'
3636

3737
# General information about the project.
38-
project = u'CFFI'
39-
copyright = u'2012-2025, Armin Rigo, Maciej Fijalkowski'
38+
project = 'CFFI'
39+
copyright = '2012-2025, Armin Rigo, Maciej Fijalkowski'
4040

4141
# The version info for the project you're documenting, acts as replacement for
4242
# |version| and |release|, also used in various other places throughout the
@@ -170,8 +170,8 @@
170170
# Grouping the document tree into LaTeX files. List of tuples
171171
# (source start file, target name, title, author, documentclass [howto/manual]).
172172
latex_documents = [
173-
('index', 'CFFI.tex', u'CFFI Documentation',
174-
u'Armin Rigo, Maciej Fijalkowski', 'manual'),
173+
('index', 'CFFI.tex', 'CFFI Documentation',
174+
'Armin Rigo, Maciej Fijalkowski', 'manual'),
175175
]
176176

177177
# The name of an image file (relative to this directory) to place at the top of

src/c/test_c.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4180,8 +4180,8 @@ def test_unpack():
41804180
for typename in ["wchar_t", "char16_t", "char32_t"]:
41814181
BWChar = new_primitive_type(typename)
41824182
BArray = new_array_type(new_pointer_type(BWChar), 10) # wchar_t[10]
4183-
p = newp(BArray, u"abc\x00def")
4184-
assert unpack(p, 10) == u"abc\x00def\x00\x00\x00"
4183+
p = newp(BArray, "abc\x00def")
4184+
assert unpack(p, 10) == "abc\x00def\x00\x00\x00"
41854185

41864186
for typename, samples in [
41874187
("uint8_t", [0, 2**8-1]),

testing/embedding/withunicode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
ffi = cffi.FFI()
1010

11-
ffi.embedding_api(u"""
11+
ffi.embedding_api("""
1212
int add1(int, int);
1313
""")
1414

0 commit comments

Comments
 (0)