2020
2121
2222def latest (lines : List [str ], regex : Pattern ) -> Optional [str ]:
23- """
24- Return the last released version.
23+ """Return the last released version.
2524
2625 Arguments:
2726 lines: Lines of the changelog file.
@@ -38,8 +37,7 @@ def latest(lines: List[str], regex: Pattern) -> Optional[str]:
3837
3938
4039def unreleased (versions : List [Version ], last_release : str ) -> List [Version ]:
41- """
42- Return the most recent versions down to latest release.
40+ """Return the most recent versions down to latest release.
4341
4442 Arguments:
4543 versions: All the versions (released and unreleased).
@@ -55,8 +53,7 @@ def unreleased(versions: List[Version], last_release: str) -> List[Version]:
5553
5654
5755def read_changelog (filepath : str ) -> List [str ]:
58- """
59- Read the changelog file.
56+ """Read the changelog file.
6057
6158 Arguments:
6259 filepath: The path to the changelog file.
@@ -69,8 +66,7 @@ def read_changelog(filepath: str) -> List[str]:
6966
7067
7168def write_changelog (filepath : str , lines : List [str ]) -> None :
72- """
73- Write the changelog file.
69+ """Write the changelog file.
7470
7571 Arguments:
7672 filepath: The path to the changelog file.
@@ -87,8 +83,7 @@ def update_changelog(
8783 template_url : str ,
8884 commit_style : str ,
8985) -> None :
90- """
91- Update the given changelog file in place.
86+ """Update the given changelog file in place.
9287
9388 Arguments:
9489 inplace_file: The file to update in-place.
@@ -120,8 +115,7 @@ def update_changelog(
120115
121116@duty
122117def changelog (ctx ):
123- """
124- Update the changelog in-place with latest commits.
118+ """Update the changelog in-place with latest commits.
125119
126120 Arguments:
127121 ctx: The context instance (passed automatically).
@@ -142,8 +136,7 @@ def changelog(ctx):
142136
143137@duty (pre = ["check_code_quality" , "check_types" , "check_docs" , "check_dependencies" ])
144138def check (ctx ): # noqa: W0613 (no use for the context argument)
145- """
146- Check it all!
139+ """Check it all!
147140
148141 Arguments:
149142 ctx: The context instance (passed automatically).
@@ -152,20 +145,18 @@ def check(ctx): # noqa: W0613 (no use for the context argument)
152145
153146@duty
154147def check_code_quality (ctx , files = PY_SRC ):
155- """
156- Check the code quality.
148+ """Check the code quality.
157149
158150 Arguments:
159151 ctx: The context instance (passed automatically).
160152 files: The files to check.
161153 """
162- ctx .run (f"flakehell lint { files } " , title = "Checking code quality" , pty = PTY )
154+ ctx .run (f"flake8 --config=config/flake8.ini { files } " , title = "Checking code quality" , pty = PTY )
163155
164156
165157@duty
166158def check_dependencies (ctx ):
167- """
168- Check for vulnerabilities in dependencies.
159+ """Check for vulnerabilities in dependencies.
169160
170161 Arguments:
171162 ctx: The context instance (passed automatically).
@@ -195,8 +186,7 @@ def check_dependencies(ctx):
195186
196187@duty
197188def check_docs (ctx ):
198- """
199- Check if the documentation builds correctly.
189+ """Check if the documentation builds correctly.
200190
201191 Arguments:
202192 ctx: The context instance (passed automatically).
@@ -208,8 +198,7 @@ def check_docs(ctx):
208198
209199@duty
210200def check_types (ctx ):
211- """
212- Check that the code is correctly typed.
201+ """Check that the code is correctly typed.
213202
214203 Arguments:
215204 ctx: The context instance (passed automatically).
@@ -219,8 +208,7 @@ def check_types(ctx):
219208
220209@duty (silent = True )
221210def clean (ctx ):
222- """
223- Delete temporary files.
211+ """Delete temporary files.
224212
225213 Arguments:
226214 ctx: The context instance (passed automatically).
@@ -238,8 +226,7 @@ def clean(ctx):
238226
239227@duty
240228def docs (ctx ):
241- """
242- Build the documentation locally.
229+ """Build the documentation locally.
243230
244231 Arguments:
245232 ctx: The context instance (passed automatically).
@@ -249,8 +236,7 @@ def docs(ctx):
249236
250237@duty
251238def docs_serve (ctx , host = "127.0.0.1" , port = 8000 ):
252- """
253- Serve the documentation (localhost:8000).
239+ """Serve the documentation (localhost:8000).
254240
255241 Arguments:
256242 ctx: The context instance (passed automatically).
@@ -262,8 +248,7 @@ def docs_serve(ctx, host="127.0.0.1", port=8000):
262248
263249@duty
264250def docs_deploy (ctx ):
265- """
266- Deploy the documentation on GitHub pages.
251+ """Deploy the documentation on GitHub pages.
267252
268253 Arguments:
269254 ctx: The context instance (passed automatically).
@@ -273,8 +258,7 @@ def docs_deploy(ctx):
273258
274259@duty
275260def format (ctx ): # noqa: W0622 (we don't mind shadowing the format builtin)
276- """
277- Run formatting tools on the code.
261+ """Run formatting tools on the code.
278262
279263 Arguments:
280264 ctx: The context instance (passed automatically).
@@ -290,8 +274,7 @@ def format(ctx): # noqa: W0622 (we don't mind shadowing the format builtin)
290274
291275@duty
292276def release (ctx , version ):
293- """
294- Release a new Python package.
277+ """Release a new Python package.
295278
296279 Arguments:
297280 ctx: The context instance (passed automatically).
@@ -311,8 +294,7 @@ def release(ctx, version):
311294
312295@duty (silent = True )
313296def coverage (ctx ):
314- """
315- Report coverage as text and HTML.
297+ """Report coverage as text and HTML.
316298
317299 Arguments:
318300 ctx: The context instance (passed automatically).
@@ -323,8 +305,7 @@ def coverage(ctx):
323305
324306@duty
325307def test (ctx , cleancov : bool = True , match : str = "" ):
326- """
327- Run the test suite.
308+ """Run the test suite.
328309
329310 Arguments:
330311 ctx: The context instance (passed automatically).
0 commit comments