Skip to content

Commit 7d2ec10

Browse files
author
Shekhar Suman
committed
Address PR feedback: use real copyright examples and remove extra spaces
1 parent 5bcc04c commit 7d2ec10

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Copyright [c] 2001-2005 Python Software Foundation

src/cluecode/copyrights.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4502,11 +4502,8 @@ def prepare_text_line(line):
45024502

45034503
# normalize copyright signs, quotes and spacing around them
45044504
.replace('"Copyright', '" Copyright')
4505-
4506-
# normalize [C] and [c] to (c) before bracket removal
45074505
.replace('[C]', '(c)')
45084506
.replace('[c]', '(c)')
4509-
45104507
.replace('( C)', ' (c) ')
45114508
.replace('(C)', ' (c) ')
45124509
.replace('(c)', ' (c) ')

tests/cluecode/test_copyrights_basic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ def test_prepare_text_line_normalizes_bracket_C_uppercase(self):
7474
assert result == '(c) The Regents of the University of Michigan and Merit Network, Inc. 1992, 1993, 1994, 1995 All Rights Reserved'
7575

7676
def test_prepare_text_line_normalizes_bracket_c_lowercase(self):
77-
cp = 'Copyright [c] 2023 Example Company'
77+
cp = 'Copyright [c] 2005, 2017 by Alex McDonald (alex at rivadpm dot com)'
7878
result = prepare_text_line(cp)
79-
assert result == 'Copyright (c) 2023 Example Company'
79+
assert result == 'Copyright (c) 2005, 2017 by Alex McDonald (alex at rivadpm dot com)'
8080

8181
def test_prepare_text_line_does_replace_copyright_signs(self):
8282
cp = 'Copyright \\A9 1991, 1999 Free Software Foundation, Inc.'

0 commit comments

Comments
 (0)