Skip to content
Snippets Groups Projects
Commit c3272f77 authored by Joseph Weston's avatar Joseph Weston
Browse files

deprecate not specfiying 'norbs' when creating site families

parent 9de6309d
No related branches found
No related tags found
No related merge requests found
......@@ -140,6 +140,10 @@ class SiteFamily(metaclass=abc.ABCMeta):
self.canonical_repr = canonical_repr
self.hash = hash(canonical_repr)
self.name = name
if norbs is None:
warnings.warn("Not specfying norbs is deprecated. Always specify "
"norbs when creating site families.",
KwantDeprecationWarning, stacklevel=3)
if norbs is not None:
if int(norbs) != norbs or norbs <= 0:
raise ValueError('The norbs parameter must be an integer > 0.')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment