lscom 0.0.3__tar.gz → 0.0.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: lscom
3
- Version: 0.0.3
3
+ Version: 0.0.5
4
4
  Summary: list available active COM ports
5
5
  Home-page: https://github.com/joshschmelzle/lscom
6
6
  Author: Josh Schmelzle
@@ -25,6 +25,7 @@ Dynamic: description-content-type
25
25
  Dynamic: home-page
26
26
  Dynamic: keywords
27
27
  Dynamic: license
28
+ Dynamic: license-file
28
29
  Dynamic: requires-dist
29
30
  Dynamic: requires-python
30
31
  Dynamic: summary
@@ -10,9 +10,9 @@ lscom
10
10
  list available serial ports
11
11
  """
12
12
 
13
+ import argparse
13
14
  import sys
14
15
 
15
- from lscom import helpers
16
16
  from lscom.__version__ import __title__, __version__
17
17
  from lscom.app import run
18
18
 
@@ -34,7 +34,14 @@ def check_python_version(): # type: ignore
34
34
 
35
35
 
36
36
  def main():
37
- parser = helpers.setup_parser()
37
+ parser = argparse.ArgumentParser(
38
+ formatter_class=argparse.RawDescriptionHelpFormatter,
39
+ description="lscom: list and discover available COM ports",
40
+ epilog="Made with Python by Josh Schmelzle",
41
+ )
42
+ parser.add_argument(
43
+ "--version", "-v", action="version", version=f"lscom version {__version__}"
44
+ )
38
45
  args = parser.parse_args() # noqa: F841
39
46
  run()
40
47
 
@@ -43,8 +50,7 @@ def init():
43
50
  check_python_version() # type: ignore
44
51
 
45
52
  if __name__ == "__main__":
46
- main()
47
- sys.exit(0)
53
+ sys.exit(main())
48
54
 
49
55
 
50
56
  init()
@@ -3,12 +3,12 @@
3
3
  # | _ _ _ ._ _
4
4
  # | _> (_ (_) | | |
5
5
 
6
- """ version information for lscom """
6
+ """version information for lscom"""
7
7
 
8
8
  __title__ = "lscom"
9
9
  __description__ = "list available active COM ports"
10
10
  __url__ = "https://github.com/joshschmelzle/lscom"
11
- __version__ = "0.0.3"
11
+ __version__ = "0.0.5"
12
12
  __author__ = "Josh Schmelzle"
13
13
  __author_email__ = "josh@joshschmelzle.com"
14
14
  __license__ = "MIT"
@@ -11,7 +11,6 @@ main app code
11
11
  """
12
12
 
13
13
  import glob
14
- import grp
15
14
  import os
16
15
  import sys
17
16
 
@@ -42,6 +41,8 @@ class lscom:
42
41
  return True, "Permission check required"
43
42
 
44
43
  try:
44
+ import grp
45
+
45
46
  dialout = grp.getgrnam("dialout")
46
47
  groups = os.getgroups()
47
48
  user = os.getlogin()
@@ -53,7 +54,8 @@ class lscom:
53
54
  f"""
54
55
  {user} is not in the dialout group. To fix:
55
56
  1. Run: sudo usermod -a -G dialout {user}
56
- 2. Log out and back in for the changes to take effect
57
+ 2. Run: newgrp dialout (to apply changes immediately)
58
+ Or log out and back in for the changes to take effect
57
59
  """,
58
60
  )
59
61
  except KeyError:
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: lscom
3
- Version: 0.0.3
3
+ Version: 0.0.5
4
4
  Summary: list available active COM ports
5
5
  Home-page: https://github.com/joshschmelzle/lscom
6
6
  Author: Josh Schmelzle
@@ -25,6 +25,7 @@ Dynamic: description-content-type
25
25
  Dynamic: home-page
26
26
  Dynamic: keywords
27
27
  Dynamic: license
28
+ Dynamic: license-file
28
29
  Dynamic: requires-dist
29
30
  Dynamic: requires-python
30
31
  Dynamic: summary
@@ -6,7 +6,6 @@ lscom/__init__.py
6
6
  lscom/__main__.py
7
7
  lscom/__version__.py
8
8
  lscom/app.py
9
- lscom/helpers.py
10
9
  lscom.egg-info/PKG-INFO
11
10
  lscom.egg-info/SOURCES.txt
12
11
  lscom.egg-info/dependency_links.txt
@@ -1,27 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- # | _ _ _ ._ _
4
- # | _> (_ (_) | | |
5
-
6
- """
7
- lscom.helpers
8
- ~~~~~~~~~~~~~
9
-
10
- helper functions
11
- """
12
-
13
- import argparse
14
-
15
- from lscom.__version__ import __version__
16
-
17
-
18
- def setup_parser():
19
- """Set default values and handle arg parser."""
20
- parser = argparse.ArgumentParser(
21
- formatter_class=argparse.RawDescriptionHelpFormatter,
22
- description="lscom: list and discover available COM ports",
23
- )
24
- parser.add_argument(
25
- "--version", "-v", action="version", version=f"lscom version is {__version__}"
26
- )
27
- return parser
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes