Skip to content

Commit 94fffd9

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 5dd17a8 commit 94fffd9

File tree

6 files changed

+19
-13
lines changed

6 files changed

+19
-13
lines changed

Diff for: .gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,4 @@ static
150150
# failed downloads
151151
compressed/*?raw=true
152152

153-
_version.py
153+
_version.py

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ A small library to determine which serial ports are arduino style boards.
44

55
```bash
66
pip install -e .
7-
```
7+
```

Diff for: find_arduino/detection.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
1-
from .boards import boards_dict
2-
from serial.tools import list_ports
31
import re
42

3+
from serial.tools import list_ports
4+
5+
from .boards import boards_dict
6+
7+
58
def check_ports():
69
not_arduinos = []
710
arduinos = []
811
for connection in list_ports.comports():
9-
port,hwid,desc = connection
12+
port, hwid, desc = connection
1013
vid_pid = re.search(r"(?<=VID\:PID\=)[0-9|A-Z|a-z]{4}\:[0-9|A-Z|a-z]{4}", desc)
1114
vid_pid = None if vid_pid is None else vid_pid.group()
1215
if vid_pid is None:
1316
not_arduinos.append(connection)
1417
else:
1518
try:
1619
board = boards_dict[vid_pid]
17-
arduinos.append((board,connection))
20+
arduinos.append((board, connection))
1821
except KeyError:
1922
not_arduinos.append(connection)
2023
return arduinos, not_arduinos
2124

25+
2226
if __name__ == "__main__":
2327
arduinos, not_arduinos = check_ports()
2428
for ard in arduinos:

Diff for: pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ write_to = "find_arduino/_version.py"
77

88
[tool.isort]
99
profile = "black"
10-

Diff for: setup.cfg

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
[metadata]
2-
name = find-arduino
2+
name = find_arduino
3+
long_description = file: README.md
4+
long_description_content_type = text/markdown
35
url = https://github.com/ianhi/detect-arduino
46
author = Ian Hunt-Isaak}}
57
author_email = [email protected]
68
license = BSD-3 Clause
79
classifiers =
8-
Development Status :: 2 - Pre-Alpha
910
'BSD license': 'License :: OSI Approved :: BSD License',
11+
Development Status :: 2 - Pre-Alpha
1012
Natural Language :: English
1113
Programming Language :: Python :: 3
14+
Programming Language :: Python :: 3 :: Only
1215
Programming Language :: Python :: 3.7
1316
Programming Language :: Python :: 3.8
1417
Programming Language :: Python :: 3.9
@@ -17,14 +20,14 @@ project_urls =
1720

1821
[options]
1922
packages = find:
23+
install_requires =
24+
pyserial
2025
python_requires = >=3.7
2126
setup_requires =
2227
setuptools_scm
23-
install_requires =
24-
pyserial
2528

2629
[flake8]
2730
exclude = docs,_version.py,.eggs,examples
2831
max-line-length = 88
2932
docstring-convention = numpy
30-
ignore = D100, D213, D401, D413, D107, W503
33+
ignore = D100, D213, D401, D413, D107, W503

Diff for: setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from setuptools import setup
22

3-
setup()
3+
setup()

0 commit comments

Comments
 (0)