Skip to content

Commit

Permalink
add more information in 'norminette --version' command (#483)
Browse files Browse the repository at this point in the history
* fix norminette version acording to pyptoject.toml

* add to 'norminette version' shows information about Python and OS version

* add a comment to ISSUE_TEMPLATE alerting user to paste the norminette version
  • Loading branch information
NiumXp authored Feb 1, 2024
1 parent beaffaf commit ef5e1d9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ Please use markdown to send the code here.


**Additional infos**
- OS:
- python3 --version:
- norminette -v:
Copy and paste the output of `norminette --version` command here.

**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion norminette/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "3.3.54"
__version__ = "3.3.55"
__name__ = "norminette"
__author__ = "42"
__author__email__ = "pedago@42.fr"
7 changes: 6 additions & 1 deletion norminette/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import glob
import sys
import pathlib
import platform
from importlib.metadata import version

import argparse
Expand All @@ -14,6 +15,10 @@

import subprocess

version_text = "norminette" + version("norminette")
version_text += f", Python {platform.python_version()}"
version_text += f", {platform.platform()}"


def main():
parser = argparse.ArgumentParser()
Expand All @@ -40,7 +45,7 @@ def main():
"-v",
"--version",
action="version",
version="norminette " + version("norminette"),
version=version_text,
)
parser.add_argument(
"--cfile",
Expand Down

0 comments on commit ef5e1d9

Please sign in to comment.