3434from . import UserInfo , UserManagerBase , __ , signal_user_looked_up
3535
3636__all__ = [
37- 'UserBase' ,
38- 'UserBase2' ,
39- 'TeamMixin' ,
40- 'TeamMembersMixin' ,
41- 'TeamBase' ,
42- 'TeamBase2' ,
37+ 'IncompleteUserMigrationError' ,
38+ 'ProfileBase' ,
4339 'ProfileMixin' ,
4440 'ProfileMixin2' ,
45- 'ProfileBase' ,
41+ 'TeamBase' ,
42+ 'TeamBase2' ,
43+ 'TeamMembersMixin' ,
44+ 'TeamMixin' ,
45+ 'UserBase' ,
46+ 'UserBase2' ,
4647 'UserManager' ,
47- 'IncompleteUserMigrationError' ,
4848]
4949
5050
@@ -140,10 +140,8 @@ def timezone(self):
140140 # Stored in userinfo since it was introduced later and a new column
141141 # will require migrations in downstream apps.
142142 return (
143- self .userinfo
144- and self .userinfo .get ('timezone' )
145- or current_app .config .get ('TIMEZONE' )
146- )
143+ self .userinfo and self .userinfo .get ('timezone' )
144+ ) or current_app .config .get ('TIMEZONE' )
147145
148146 @property
149147 def oldids (self ):
@@ -152,7 +150,7 @@ def oldids(self):
152150 # will require migrations in downstream apps. Also, this is an array
153151 # and will require (a) a joined table, (b) Postgres-specific arrays, or (c) data massaging
154152 # by joining with spaces, like "access_scope" above.
155- return self .userinfo and self .userinfo .get ('oldids' ) or []
153+ return ( self .userinfo and self .userinfo .get ('oldids' ) ) or []
156154
157155 # Use cached_property here because pytz.timezone is relatively slow:
158156 #
@@ -765,8 +763,8 @@ def update_from_user(
765763 profile .name = make_name (
766764 profile .userid ,
767765 maxlength = 250 ,
768- checkused = lambda c : (
769- bool ( session .query (cls .name ).filter_by (name = c ).first () )
766+ checkused = lambda c : bool (
767+ session .query (cls .name ).filter_by (name = c ).first ()
770768 ),
771769 )
772770
0 commit comments