2626 "Jinja2==3.0.3" , # https://github.com/pallets/flask/issues/4494
2727 "pytest-cov>=2,<3" ,
2828 "codecov>=2,<3" ,
29- "flake8>=4,<5 " ,
30- "black==22.3 .0" ,
29+ "flake8>=5,<6 " ,
30+ "black==22.6 .0" ,
3131 "click==8.0.4" , # black is affected by https://github.com/pallets/click/issues/2225
3232 "psutil>=5,<6" ,
3333 "databases>=0.5" ,
3737 "moto>=3,<4" , # For AWS tests
3838]
3939codegen_dependencies = [
40- "black==22.3 .0" ,
40+ "black==22.6 .0" ,
4141]
4242
4343needs_pytest = {"pytest" , "test" , "ptr" }.intersection (sys .argv )
@@ -122,12 +122,8 @@ def run(self):
122122 async_source = header + source
123123 async_source = re .sub (" def " , " async def " , async_source )
124124 async_source = re .sub ("from asyncio import Future\n " , "" , async_source )
125- async_source = re .sub (
126- "return self.api_call\(" , "return await self.api_call(" , async_source
127- )
128- async_source = re .sub (
129- "-> SlackResponse" , "-> AsyncSlackResponse" , async_source
130- )
125+ async_source = re .sub ("return self.api_call\(" , "return await self.api_call(" , async_source )
126+ async_source = re .sub ("-> SlackResponse" , "-> AsyncSlackResponse" , async_source )
131127 async_source = re .sub (
132128 "from .base_client import BaseClient, SlackResponse" ,
133129 "from .async_base_client import AsyncBaseClient, AsyncSlackResponse" ,
@@ -149,9 +145,7 @@ def run(self):
149145 output .write (async_source )
150146
151147 legacy_source = header + "from asyncio import Future\n " + source
152- legacy_source = re .sub (
153- "-> SlackResponse" , "-> Union[Future, SlackResponse]" , legacy_source
154- )
148+ legacy_source = re .sub ("-> SlackResponse" , "-> Union[Future, SlackResponse]" , legacy_source )
155149 legacy_source = re .sub (
156150 "from .base_client import BaseClient, SlackResponse" ,
157151 "from .legacy_base_client import LegacyBaseClient, SlackResponse" ,
@@ -193,15 +187,9 @@ def run(self):
193187 [sys .executable , "-m" , "pip" , "install" ] + validate_dependencies ,
194188 )
195189 self ._run ("Running black ..." , [sys .executable , "-m" , "black" , f"{ here } /slack" ])
196- self ._run (
197- "Running black ..." , [sys .executable , "-m" , "black" , f"{ here } /slack_sdk" ]
198- )
199- self ._run (
200- "Running flake8 for legacy packages ..." , [sys .executable , "-m" , "flake8" , f"{ here } /slack" ]
201- )
202- self ._run (
203- "Running flake8 for slack_sdk package ..." , [sys .executable , "-m" , "flake8" , f"{ here } /slack_sdk" ]
204- )
190+ self ._run ("Running black ..." , [sys .executable , "-m" , "black" , f"{ here } /slack_sdk" ])
191+ self ._run ("Running flake8 for legacy packages ..." , [sys .executable , "-m" , "flake8" , f"{ here } /slack" ])
192+ self ._run ("Running flake8 for slack_sdk package ..." , [sys .executable , "-m" , "flake8" , f"{ here } /slack_sdk" ])
205193
206194 target = self .test_target .replace ("tests/" , "" , 1 )
207195 self ._run (
@@ -230,7 +218,12 @@ def run(self):
230218 target = self .test_target .replace ("tests/" , "" , 1 )
231219 self ._run (
232220 "Running unit tests ..." ,
233- [sys .executable , "-m" , "pytest" , f"tests/{ target } " ,],
221+ [
222+ sys .executable ,
223+ "-m" ,
224+ "pytest" ,
225+ f"tests/{ target } " ,
226+ ],
234227 )
235228
236229
@@ -251,7 +244,13 @@ def run(self):
251244 target = self .test_target .replace ("integration_tests/" , "" , 1 )
252245 path = f"integration_tests/{ target } "
253246 self ._run (
254- "Running integration tests ..." , [sys .executable , "-m" , "pytest" , path ,],
247+ "Running integration tests ..." ,
248+ [
249+ sys .executable ,
250+ "-m" ,
251+ "pytest" ,
252+ path ,
253+ ],
255254 )
256255
257256
0 commit comments