File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,8 +32,10 @@ def assert_no_oslo(logical_line):
3232
3333 O400
3434 """
35- if re .match (r'(from|import) oslo_.*' , logical_line ):
36- yield (0 , "0400: oslo libraries should not be used in SDK projects" )
35+ if match := re .match (r'(from|import) (oslo_.*)' , logical_line ):
36+ if match .group (2 ) == 'oslo_i18n' :
37+ return
38+ yield (0 , "O400: oslo libraries should not be used in SDK projects" )
3739
3840
3941@core .flake8ext
@@ -86,7 +88,7 @@ def assert_use_of_client_aliases(logical_line):
8688 logical_line ,
8789 ):
8890 service = match .group (1 )
89- yield (0 , f"0402 : prefer { service } _client to sdk_connection.{ service } " )
91+ yield (0 , f"O402 : prefer { service } _client to sdk_connection.{ service } " )
9092
9193 if match := re .match (
9294 r'(self\.app\.client_manager\.(compute|network|image)+\.[a-z_]+) = mock.Mock' , # noqa: E501
You can’t perform that action at this time.
0 commit comments