@@ -279,8 +279,7 @@ def __matmul__(self, other):
279279 Use .join(other, semantic_check=False) for permissive joins.
280280 """
281281 raise DataJointError (
282- "The @ operator has been removed in DataJoint 2.0. "
283- "Use .join(other, semantic_check=False) for permissive joins."
282+ "The @ operator has been removed in DataJoint 2.0. " "Use .join(other, semantic_check=False) for permissive joins."
284283 )
285284
286285 def join (self , other , semantic_check = True , left = False ):
@@ -299,9 +298,9 @@ def join(self, other, semantic_check=True, left=False):
299298 a * b is short for a.join(b)
300299 a.join(b, semantic_check=False) for permissive joins
301300 """
302- # Handle U objects: redirect to U's restriction operation
301+ # U joins are deprecated - raise error directing to use & instead
303302 if isinstance (other , U ):
304- return other & self
303+ raise DataJointError ( "dj.U(...) * table is deprecated in DataJoint 2.0. " "Use dj.U(...) & table instead." )
305304 if inspect .isclass (other ) and issubclass (other , QueryExpression ):
306305 other = other () # instantiate
307306 if not isinstance (other , QueryExpression ):
@@ -310,9 +309,7 @@ def join(self, other, semantic_check=True, left=False):
310309 assert_join_compatibility (self , other )
311310 # Only join on homologous namesakes (same name AND same lineage)
312311 join_attributes = set (
313- n
314- for n in self .heading .names
315- if n in other .heading .names and self .heading [n ].lineage == other .heading [n ].lineage
312+ n for n in self .heading .names if n in other .heading .names and self .heading [n ].lineage == other .heading [n ].lineage
316313 )
317314 # needs subquery if self's FROM clause has common attributes with other's FROM clause
318315 need_subquery1 = need_subquery2 = bool (
@@ -846,18 +843,13 @@ def __mul__(self, other):
846843 dj.U * table is deprecated in DataJoint 2.0.
847844 Use dj.U & table instead.
848845 """
849- raise DataJointError (
850- "dj.U(...) * table is deprecated in DataJoint 2.0. "
851- "Use dj.U(...) & table instead."
852- )
846+ raise DataJointError ("dj.U(...) * table is deprecated in DataJoint 2.0. " "Use dj.U(...) & table instead." )
853847
854848 def __sub__ (self , other ):
855849 """
856850 dj.U - table produces an infinite set and is not supported.
857851 """
858- raise DataJointError (
859- "dj.U(...) - table produces an infinite set and is not supported."
860- )
852+ raise DataJointError ("dj.U(...) - table produces an infinite set and is not supported." )
861853
862854 def aggr (self , group , ** named_attributes ):
863855 """
0 commit comments