Skip to content

Commit cba50a6

Browse files
committed
chore: add assignUniqueLabels deprecation message
1 parent 193a640 commit cba50a6

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* No news added: add deprecation message for `assignUniqueLabels`
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* <news item>
20+
21+
**Security:**
22+
23+
* <news item>

src/diffpy/structure/structure.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,19 @@
2121

2222
from diffpy.structure.atom import Atom
2323
from diffpy.structure.lattice import Lattice
24-
from diffpy.structure.utils import _link_atom_attribute, atomBareSymbol, isiterable
24+
from diffpy.structure.utils import _link_atom_attribute, atom_bare_symbol, isiterable
2525
from diffpy.utils._deprecator import build_deprecation_message, deprecated
2626

2727
# ----------------------------------------------------------------------------
2828

2929
base = "diffpy.structure.Structure"
3030
removal_version = "4.0.0"
31+
assignUniqueLabels_deprecation_msg = build_deprecation_message(
32+
base,
33+
"assignUniqueLabels",
34+
"assign_unique_labels",
35+
removal_version,
36+
)
3137
addNewAtom_deprecation_msg = build_deprecation_message(
3238
base,
3339
"addNewAtom",
@@ -242,7 +248,7 @@ def assign_unique_labels(self):
242248
for a in self:
243249
if a in islabeled:
244250
continue
245-
baresmbl = atomBareSymbol(a.element)
251+
baresmbl = atom_bare_symbol(a.element)
246252
elnum[baresmbl] = elnum.get(baresmbl, 0) + 1
247253
a.label = baresmbl + str(elnum[baresmbl])
248254
islabeled.add(a)

0 commit comments

Comments
 (0)