@@ -75,7 +75,7 @@ def items(self):
7575 return list (zip (self .keys (), self .values ()))
7676
7777
78- class _iRODSAccess_base :
78+ class _iRODSAccess_base : # noqa: N801
7979 @classmethod
8080 def to_int (cls , key ):
8181 return cls .codes [key ]
@@ -204,25 +204,30 @@ def __repr__(self):
204204
205205class iRODSAccess (_iRODSAccess_base , metaclass = _Access_LookupMeta ):
206206 """
207- This class represents an ACL in iRODS and functions as a data container
208- to convey information to the iRODS server (in the `set` call) and back again to the client
209- again (in the `get` call).
207+ Represents an ACL in iRODS.
208+
209+ An instance of this class functions as a data container to convey information to the iRODS
210+ server (in the `set` call) and back again to the client again (in the `get` call).
210211 """
211212
212213 def __init__ (self , access_name , path , user_name = "" , user_zone = "" , user_type = None ):
214+ # noqa: D107
213215 self .codes = self .__class__ .codes
214216 self .strings = self .__class__ .strings
215217 super ().__init__ (access_name , path , user_name , user_zone , user_type )
216218
217219
218220class ACLOperation (iRODSAccess ):
219221 """
220- Similar to its base class iRODSAccess, this class represents an ACL to be set on an object.
221- but this class is the counterpart used for the atomic ACLs api. It differs from its base
222- class in that it has no field to store a logical object path. (For an atomic API call, i
223- here is always a single logical path to which all operations apply, meaning that it is
224- appropriate to conveyed that in a location separate from the operations themselves.)
225- """
222+ Represents an operation to be performed in iRODS' atomic ACL api.
223+
224+ Similar to its base class, iRODSAccess, this class names an ACL to be set on an object.
225+ It differs, however, in that it forgoes option to store a logical object path. (In the atomic
226+ API call, there is always a single logical path to which all such operations apply, thus
227+ it is appropriate that the path parameter is in a location separate from the operations.)
228+ """ # noqa: D400 RUF100
229+
230+ # ruff: noqa: D105 on
226231
227232 def __init__ (self , access_name : str , user_name : str = "" , user_zone : str = "" ):
228233 super ().__init__ (
@@ -244,6 +249,7 @@ def __eq__(self, other):
244249 )
245250
246251 def __hash__ (self ):
252+
247253 # Hash in a way consistent with an iRODSAccess having path "".
248254 return hash ((
249255 self .access_name ,
@@ -266,6 +272,8 @@ def __lt__(self, other):
266272 def __repr__ (self ):
267273 return f"<ACLOperation { self .access_name } { self .user_name } { self .user_zone } >"
268274
275+ # ruff: noqa: D105 off
276+
269277
270278(
271279 _synonym_mapping := {
@@ -283,6 +291,7 @@ def __repr__(self):
283291canonical_permissions = {k : v for k , v in all_permissions .items () if ' ' not in k and k not in ('read' , 'write' )}
284292
285293
294+ # ruff: noqa: RUF012 N801 on
286295class _deprecated :
287296 class _iRODSAccess_pre_4_3_0 (_iRODSAccess_base ):
288297 codes = collections .OrderedDict (
@@ -294,13 +303,16 @@ class _iRODSAccess_pre_4_3_0(_iRODSAccess_base):
294303
295304 def __init__ (self , * args , ** kwargs ):
296305 warnings .warn (
297- "_iRODSAccess_pre_4_3_0 is deprecated and will be removed in a future version. Use iRODSAccess instead." ,
306+ "_iRODSAccess_pre_4_3_0 is deprecated and will be removed in "
307+ "a future version. Use iRODSAccess instead." ,
298308 DeprecationWarning ,
299309 stacklevel = 2 ,
300310 )
301311 super ().__init__ (* args , ** kwargs )
302312
303313
314+ # ruff: noqa: RUF012 N801 SLF001 off
315+
304316_deprecated_names = {'_iRODSAccess_pre_4_3_0' : _deprecated ._iRODSAccess_pre_4_3_0 }
305317
306318
0 commit comments