This repository was archived by the owner on Feb 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +28
-3
lines changed
Expand file tree Collapse file tree 2 files changed +28
-3
lines changed Original file line number Diff line number Diff line change 2727
2828
2929def generate_license (directory : Path , licence : str ) -> None :
30- """Generate license file for the project."""
30+ """Generate license file for the project.
31+
32+ Args:
33+ directory: path to the project directory
34+ licence: chosen licence
35+ """
3136 move (str (directory / "_licences" / f"{ licence } .txt" ), str (directory / "LICENSE" ))
3237 rmtree (str (directory / "_licences" ))
3338
3439
3540def remove_unused_files (directory : Path , module_name : str , need_to_remove_cli : bool ) -> None :
36- """Remove unused files."""
41+ """Remove unused files.
42+
43+ Args:
44+ directory: path to the project directory
45+ module_name: project module name
46+ need_to_remove_cli: flag for removing CLI related files
47+ """
3748 files_to_delete : List [Path ] = []
3849
3950 def _cli_specific_files () -> List [Path ]:
@@ -47,7 +58,12 @@ def _cli_specific_files() -> List[Path]:
4758
4859
4960def print_futher_instuctions (project_name : str , github : str ) -> None :
50- """Show user what to do next after project creation."""
61+ """Show user what to do next after project creation.
62+
63+ Args:
64+ project_name: current project name
65+ github: GitHub username
66+ """
5167 message = f"""
5268 Your project { project_name } is created.
5369
Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ def validate_project_name(project_name: str) -> None:
3737 Valid inputs starts with the lowercase letter.
3838 Followed by any lowercase letters, numbers or underscores.
3939
40+ Args:
41+ project_name: current project name
42+
4043 Raises:
4144 ValueError: If project_name is not a valid Python module name
4245 """
@@ -48,6 +51,9 @@ def validate_project_name(project_name: str) -> None:
4851def validate_semver (version : str ) -> None :
4952 """Ensure version in semver notation.
5053
54+ Args:
55+ version: string version. For example 0.1.2 or 1.2.4
56+
5157 Raises:
5258 ValueError: If version is not in semver notation
5359 """
@@ -59,6 +65,9 @@ def validate_semver(version: str) -> None:
5965def validate_line_length (line_length : int ) -> None :
6066 """Validate line_length parameter. Length should be between 50 and 300.
6167
68+ Args:
69+ line_length: integer paramenter for isort and black formatters
70+
6271 Raises:
6372 ValueError: If line_length isn't between 50 and 300
6473 """
You can’t perform that action at this time.
0 commit comments